Repository navigation
Tags: meshy-dev/meshy-mcp-server
Tags
fix: strip the draft-07 dialect marker from published tool schemas (#9) * fix: strip the draft-07 dialect marker from published tool schemas The MCP SDK converts our Zod schemas with zod-to-json-schema, which stamps "$schema": "http://json-schema.org/draft-07/schema#" onto both inputSchema and outputSchema. There is no way to override it: the SDK's call sites pass only strictUnions and pipeStrategy, so the Zod v3 branch falls through to the zod-to-json-schema default and the v4 branch resolves mapMiniTarget(undefined) to draft-7. Verified on SDK 1.27.1 and 1.30.0 against Zod 3.25.76 and Zod 4 — all four emit draft-07, so no dependency bump fixes this. Clients that compile tool schemas with an Ajv configured for JSON Schema 2020-12, as Claude Desktop and Claude Code do, reject every tool carrying that marker. All 15 tools declaring an outputSchema were unusable, which is every generation tool plus meshy_get_task_status; the 9 declaring none still loaded, which is why the server looked connected and meshy_list_tasks kept working. Strip the marker at the transport layer so it covers the whole tool list once instead of per registration, on both stdio and HTTP. The schema bodies are untouched — only the dialect declaration goes, and clients then validate under their own default. Verified by running the real stdio transport and compiling every emitted schema with Ajv 2020-12: 39 of 39 failed before, 39 of 39 pass after.
PreviousNext