/** * Shared MCP tool types — split out so per-domain tool modules (./tools/*.ts) and the * main tools.ts registry can both declare ToolDefinition[]/handler maps without one * importing the other. */ export type ToolHandler = (args: Record) => Promise>; /** * Hints only (per spec: "Clients should never make tool use decisions based on * ToolAnnotations received from untrusted servers") — but a well-behaved client uses * them to skip confirmation friction on safe tools and add it on risky ones, which is * exactly what tryElicitConfirmation (see ./utils) does server-side for the riskiest tools. * Unset fields fall back to the spec defaults: readOnlyHint=false, destructiveHint=true, * idempotentHint=false, openWorldHint=true — so only non-default values need stating. */ export interface ToolAnnotations { readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; } export interface ToolDefinition { name: string; description: string; inputSchema: { type: string; properties?: Record; required?: string[]; }; outputSchema?: { type: string; properties?: Record; required?: string[]; }; annotations?: ToolAnnotations; execution?: { taskSupport: "optional" | "required"; }; } //# sourceMappingURL=toolTypes.d.ts.map