(name: TName)
| 23 | } |
| 24 | |
| 25 | function createMockTool<TName extends string>(name: TName) { |
| 26 | const def = toolDefinition({ |
| 27 | name, |
| 28 | description: `The ${name} tool`, |
| 29 | inputSchema: z.object({ query: z.string() }), |
| 30 | outputSchema: z.object({ result: z.string() }), |
| 31 | }) |
| 32 | return def.server(async (input) => ({ result: input.query })) |
| 33 | } |
| 34 | |
| 35 | describe('createCodeModeTool', () => { |
| 36 | it('throws on empty tools array', () => { |
no test coverage detected