Merge pull request #150 from disintegrator/zod-to-json-schema-strict-unions
fix: drop unresolved union members in zod schemas
This commit is contained in:
commit
506ae06b03
1 changed files with 3 additions and 1 deletions
|
|
@ -108,7 +108,9 @@ export class McpServer {
|
|||
name,
|
||||
description: tool.description,
|
||||
inputSchema: tool.inputSchema
|
||||
? (zodToJsonSchema(tool.inputSchema) as Tool["inputSchema"])
|
||||
? (zodToJsonSchema(tool.inputSchema, {
|
||||
strictUnions: true,
|
||||
}) as Tool["inputSchema"])
|
||||
: EMPTY_OBJECT_JSON_SCHEMA,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue