Skip to content

Commit 506ae06

Browse files
Merge pull request #150 from disintegrator/zod-to-json-schema-strict-unions
fix: drop unresolved union members in zod schemas
2 parents 89bb5e8 + 7c7e4ad commit 506ae06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/mcp.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ export class McpServer {
108108
name,
109109
description: tool.description,
110110
inputSchema: tool.inputSchema
111-
? (zodToJsonSchema(tool.inputSchema) as Tool["inputSchema"])
111+
? (zodToJsonSchema(tool.inputSchema, {
112+
strictUnions: true,
113+
}) as Tool["inputSchema"])
112114
: EMPTY_OBJECT_JSON_SCHEMA,
113115
};
114116
},

0 commit comments

Comments
 (0)