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

Function createTool

src/services/tools/StreamingToolExecutor.test.ts:27–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27function createTool(): Tool {
28 return {
29 name: 'FakeTool',
30 inputSchema: z.object({}),
31 outputSchema: z.unknown(),
32 description: async () => 'fake',
33 isEnabled: () => true,
34 isConcurrencySafe: () => false,
35 isReadOnly: () => false,
36 isDestructive: () => false,
37 userFacingName: () => 'FakeTool',
38 checkPermissions: async input => ({
39 behavior: 'allow',
40 updatedInput: input,
41 }),
42 toAutoClassifierInput: () => '',
43 call: async () => ({
44 data: 'ok',
45 }),
46 mapToolResultToToolResultBlockParam: (data, toolUseId) => ({
47 type: 'tool_result',
48 tool_use_id: toolUseId,
49 content: String(data),
50 }),
51 } as unknown as Tool
52}
53
54function createToolUseContext(
55 tool: Tool,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected