MCPcopy
hub / github.com/TanStack/ai / createMockTool

Function createMockTool

packages/ai-code-mode/tests/create-code-mode.test.ts:17–24  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

15}
16
17function createMockTool(name: string) {
18 return toolDefinition({
19 name: name as any,
20 description: `The ${name} tool`,
21 inputSchema: z.object({ query: z.string() }),
22 outputSchema: z.object({ result: z.string() }),
23 }).server(async (input: any) => ({ result: input.query }))
24}
25
26describe('createCodeMode', () => {
27 it('returns an object with tool and systemPrompt keys', () => {

Callers 1

Calls 1

toolDefinitionFunction · 0.90

Tested by

no test coverage detected