MCPcopy Create free account
hub / github.com/Noumena-Network/code / createFakeTool

Function createFakeTool

src/query.test.ts:76–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76function createFakeTool(): Tool {
77 return {
78 name: 'FakeTool',
79 inputSchema: z.object({}),
80 outputSchema: z.unknown(),
81 description: async () => 'fake',
82 isEnabled: () => true,
83 isConcurrencySafe: () => false,
84 isReadOnly: () => false,
85 isDestructive: () => false,
86 userFacingName: () => 'FakeTool',
87 checkPermissions: async input => ({
88 behavior: 'allow',
89 updatedInput: input,
90 }),
91 toAutoClassifierInput: () => '',
92 call: async () => ({
93 data: 'ok',
94 }),
95 mapToolResultToToolResultBlockParam: (data, toolUseId) => ({
96 type: 'tool_result',
97 tool_use_id: toolUseId,
98 content: String(data),
99 }),
100 } as unknown as Tool
101}
102
103function registerStopHook(
104 toolUseContext: ReturnType<typeof createToolUseContext>,

Callers 1

query.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected