We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b37056b commit 9c5d1d6Copy full SHA for 9c5d1d6
src/server/mcp.ts
@@ -102,18 +102,14 @@ export class McpServer {
102
title: tool.title,
103
description: tool.description,
104
inputSchema: tool.inputSchema
105
- ? (zodToJsonSchema(tool.inputSchema, {
106
- strictUnions: true
107
- }) as Tool['inputSchema'])
+ ? (z.toJSONSchema(tool.inputSchema) as Tool['inputSchema'])
108
: EMPTY_OBJECT_JSON_SCHEMA,
109
annotations: tool.annotations,
110
_meta: tool._meta
111
};
112
113
if (tool.outputSchema) {
114
- toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, {
115
116
- }) as Tool['outputSchema'];
+ toolDefinition.outputSchema = z.toJSONSchema(tool.outputSchema) as Tool['outputSchema'];
117
}
118
119
return toolDefinition;
0 commit comments