mcp-server/src/tools/README-ZOD-V3.md
xsschema to convert schemas → outputs JSON Schema Draft 2020-12All MCP tool files import from zod/v3 instead of zod:
import { z } from 'zod/v3'; // ✅ Draft-07 compatible
// NOT: import { z } from 'zod'; // ❌ Would use Draft 2020-12
zod/v3zod/v3 (this directory)zod (Zod v4)This workaround can be removed when either:
FastMCP adds JSON Schema version configuration
new FastMCP({ jsonSchema: { target: 'draft-07' } })MCP spec adds Draft 2020-12 support
xsschema adds version targeting
When adding new MCP tools:
// ✅ CORRECT
import { z } from 'zod/v3';
server.addTool({
name: 'my_tool',
parameters: z.object({ ... }), // Will use Draft-07
execute: async (args) => { ... }
});
// ❌ WRONG - Will break MCP client compatibility
import { z } from 'zod'; // Don't do this in mcp-server/src/tools/
Last Updated: 2025-10-18
Affects: All files in mcp-server/src/tools/