Interface Tool
interface Tool {
name: string;
description: string;
parameters: ToolParameters;
call(args: Record<string, unknown>): Promise<string>;
}
name: string;
description: string;
parameters: ToolParameters;
call(args: Record<string, unknown>): Promise<string>;
}
Properties
Readonlyname
name: string
The name a model calls, such as memco_search.
Readonlydescription
description: string
What the operation is for, as a model should read it.
Readonlyparameters
A JSON Schema object describing the arguments, with a description on each.
Built fresh per Session.tools call, so a framework that normalises schemas in place cannot reach through and corrupt another tool's.
One memory operation, ready to hand to an agent framework.
The four fields are the whole handover: Tool.name and Tool.description tell a model what this is, Tool.parameters tells it what to send, and Tool.call runs it and returns text to hand straight back as the tool result — no rendering left to do.
Tool.call throws every failure except the two in AGENT_RECOVERABLE, a malformed request and a handle that resolves to nothing, which come back as text for the model to act on. So a rejected credential, a timeout, an unreachable service or a spent quota reaches your code as an exception rather than reaching the model as a suggestion to try again.
Reach for these individually when wiring a framework by hand; Toolset already does it for the frameworks it names.
Example