ToolSpec
Defined in: src/tools/types.ts:13
Specification for a tool that can be used by the model. Defines the tool’s name, description, and input schema.
Properties
Section titled “Properties”name: string;Defined in: src/tools/types.ts:17
The unique name of the tool.
description
Section titled “description”description: string;Defined in: src/tools/types.ts:23
A description of what the tool does. This helps the model understand when to use the tool.
inputSchema?
Section titled “inputSchema?”optional inputSchema?: JSONSchema7;Defined in: src/tools/types.ts:29
JSON Schema defining the expected input structure for the tool. If omitted, defaults to an empty object schema allowing no input parameters.
outputSchema?
Section titled “outputSchema?”optional outputSchema?: JSONSchema7;Defined in: src/tools/types.ts:34
JSON Schema defining the expected output structure for the tool.
annotations?
Section titled “annotations?”optional annotations?: Record<string, JSONValue | undefined>;Defined in: src/tools/types.ts:43
Untrusted tool-behavior hints (e.g. MCP readOnlyHint, destructiveHint); never a security boundary.
Not sent to model provider APIs. A missing key means unknown, not false — per MCP spec
destructiveHint and openWorldHint default to true when absent — and the field is absent
entirely for non-MCP tools.