We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 858072c commit 5c02660Copy full SHA for 5c02660
packages/opencontrol/src/mcp.ts
@@ -41,11 +41,10 @@ export function createMcp(input: { tools: Tool[] }) {
41
return {
42
tools: input.tools.map((tool) => ({
43
name: tool.name,
44
- inputSchema: tool.args
45
- ? (zodToJsonSchema(tool.args as any, "args").definitions![
46
- "args"
47
- ] as any)
48
- : { type: "object", properties: {} },
+ inputSchema: zodToJsonSchema(
+ (tool.args || z.object({}) as any),
+ "args",
+ ).definitions!["args"] as any,
49
description: tool.description,
50
})),
51
} satisfies ListToolsResult
0 commit comments