fix: Zod to JSONSchema pipe strategies (#962)
This commit is contained in:
parent
718120d796
commit
c543095985
1 changed files with 4 additions and 2 deletions
|
|
@ -104,7 +104,8 @@ export class McpServer {
|
|||
description: tool.description,
|
||||
inputSchema: tool.inputSchema
|
||||
? (zodToJsonSchema(tool.inputSchema, {
|
||||
strictUnions: true
|
||||
strictUnions: true,
|
||||
pipeStrategy: 'input'
|
||||
}) as Tool['inputSchema'])
|
||||
: EMPTY_OBJECT_JSON_SCHEMA,
|
||||
annotations: tool.annotations,
|
||||
|
|
@ -113,7 +114,8 @@ export class McpServer {
|
|||
|
||||
if (tool.outputSchema) {
|
||||
toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, {
|
||||
strictUnions: true
|
||||
strictUnions: true,
|
||||
pipeStrategy: 'output'
|
||||
}) as Tool['outputSchema'];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue