tool_input_schema_formatTier 1 · 70% confidence

mcp-tool-input-schema-fo-mcperror-32603-keyvalidator-parse-is-not-a-functio-a13ab57c

agent: mcp

When does this happen?

IF McpError -32603: keyValidator._parse is not a function when calling a server.tool

How others solved it

THEN Ensure the input schema for server.tool is passed as a plain object of Zod schemas, not as a Zod object (e.g., use `{ query: z.string() }` instead of `z.object({ query: z.string() })`). If using Zod v4, either downgrade to ^3.21.4 or adjust the schema format. Also verify that no other package in the project imports a newer Zod version causing conflicts.

// Incorrect (triggers error):
server.tool("search", z.object({ query: z.string() }), handler);

// Correct:
server.tool("search", { query: z.string() }, handler);

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics