The ToolState shape this tool requires. Default: base ToolState.
Optional per-tool scope shape. When set via scopeSchema, the
classifier may emit a value of this shape per turn so the tool's description
and inputSchema can be rebuilt narrower for that step. Tools without scope
leave this at the default unknown; scopeSchema is then absent and no rebuild
ever runs for the tool.
OptionalclassificationCompact one-liner for the intent classifier prompt.
OptionaldependsTool names that must run before this one.
Description of the tool's purpose.
OptionalexampleNatural language prompts (e.g. 'Where is the Louvre?').
OptionalexamplesUsage examples (e.g. 'geocode("Amsterdam")').
Function that executes the tool. Receives parsed input and the agent's state.
Zod schema defining the tool's input parameters.
OptionaloutputOptional Zod schema describing the tool's structured output.
OptionalrelatedTool names that are often used together with this tool.
OptionalscopeCompact one-line hint for the classifier explaining when and how to scope
this tool (e.g. "Emit { kinds: ['places'] } when only places entries
are relevant"). Appended to the tool's classifier-prompt entry.
OptionalscopeOptional per-tool scope schema. When set, the classifier may emit a
scope value (validated against this schema) and prepareStep will
rebuild this tool's description + inputSchema by re-invoking its
ToolEntryBuilder with the parsed scope. Tools without a builder
cannot be scoped — scopeSchema is only meaningful on builder-produced
entries.
OptionaltagsCategory tags (e.g. 'location', 'routing').
A tool definition — the universal format for both built-in and third-party tools. Combines execution (inputSchema + execute) with classifier metadata.