Override schema() to use the MCP-provided JSON Schema directly (skip zod conversion).
()
| 34 | } |
| 35 | |
| 36 | /** Override schema() to use the MCP-provided JSON Schema directly (skip zod conversion). */ |
| 37 | schema(): ToolSchema { |
| 38 | const inputSchema = this.toolDef.inputSchema ?? { type: 'object', properties: {} }; |
| 39 | return { |
| 40 | type: 'function', |
| 41 | function: { |
| 42 | name: this.name, |
| 43 | description: this.description, |
| 44 | parameters: inputSchema as ToolSchema['function']['parameters'], |
| 45 | }, |
| 46 | }; |
| 47 | } |
| 48 | |
| 49 | async execute(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolResult> { |
no outgoing calls
no test coverage detected