/** * CLI MCP Client — error type and input-schema validation helpers * Split out of mcp-client.ts (file-size sweep). Pure move. */ import type { MCPTool } from './mcp-tools/types.js'; /** * MCP Client Error */ export declare class MCPClientError extends Error { toolName: string; cause?: Error | undefined; constructor(message: string, toolName: string, cause?: Error | undefined); } /** * Check present arguments against the `type` each property declares in the * tool's inputSchema and WARN on a mismatch — deliberately non-fatal for now. * * `required` is already hard-enforced above; `type` is not, because nothing * ever checked it, so a tool declaring `{type: 'string'}` has always been free * to receive a number and reach its handler. Turning that into a throw without * knowing how many real callers violate their own schemas would break working * code, so this logs first: run the suite, count the warnings, then decide. * * Absent properties are ignored — that is `required`'s job, not this one's. * Explicit null is also ignored here for the same reason (the required check * already rejects it for required params, and an optional param set to null is * an "unset" idiom, not a type error). */ export declare function warnOnTypeMismatch(toolName: string, schema: MCPTool['inputSchema'] | undefined, input: Record): void; //# sourceMappingURL=mcp-client-validation.d.ts.map