Zod schema type for input validation (default: any Zod type)
Optional Readonly_Optional metadata passed through to the MCP SDK tool registration.
This is a generic passthrough for protocol-level metadata like
{ ui: { resourceUri: 'app://my-app' } } used by MCP Apps.
The framework does not interpret _meta — it is forwarded as-is.
Optional ReadonlyannotationsOptional annotations providing hints about tool behavior.
Per MCP specification, annotations help clients understand tool characteristics without needing to parse the description. These are hints, not guarantees.
ReadonlydescriptionHuman-readable description shown to LLM
Tool handler function.
Validated input (typed from Zod schema)
Execution context with progress reporter, abort signal
MCP CallToolResult (use response helpers: text(), json(), error())
ReadonlyinputZod schema for input validation
ReadonlynameUnique tool name (e.g., 'greet', 'list_servers')
Optional ReadonlyrequiredScopes required to execute this tool (RBAC).
When set, the framework checks authInfo.scopes BEFORE
the handler executes. All listed scopes must be present (AND logic).
If the check fails, a 403 Forbidden error is returned.
Omit or set to undefined for tools accessible to any authenticated user.
Tool definition - the canonical type for MCP tools.
This is the ONLY type needed for defining and registering tools. Used by
defineTool(),ToolRegistry, andMcpServerBuilder.Example