Skip to content

Commit c543095

Browse files
fix: Zod to JSONSchema pipe strategies (#962)
1 parent 718120d commit c543095

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/mcp.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ export class McpServer {
104104
description: tool.description,
105105
inputSchema: tool.inputSchema
106106
? (zodToJsonSchema(tool.inputSchema, {
107-
strictUnions: true
107+
strictUnions: true,
108+
pipeStrategy: 'input'
108109
}) as Tool['inputSchema'])
109110
: EMPTY_OBJECT_JSON_SCHEMA,
110111
annotations: tool.annotations,
@@ -113,7 +114,8 @@ export class McpServer {
113114

114115
if (tool.outputSchema) {
115116
toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, {
116-
strictUnions: true
117+
strictUnions: true,
118+
pipeStrategy: 'output'
117119
}) as Tool['outputSchema'];
118120
}
119121

0 commit comments

Comments
 (0)