MCPcopy Index your code
hub / github.com/Xyntopia/taskyon / extractToolExample

Function extractToolExample

src/modules/tools.ts:156–170  ·  view source on GitHub ↗
(toolName: string)

Source from the content-addressed store, hash-verified

154
155// Function to extract the tool object as an example, including the function signatures
156function extractToolExample(toolName: string) {
157 const tool = tools[toolName];
158 if (tool) {
159 const functionSignature = getFunctionSignature(tool.function);
160 const stateSignature = getFunctionSignature(tool.state);
161 const toolExample = {
162 ...tool,
163 function: functionSignature,
164 state: stateSignature,
165 };
166 return JSON.stringify(toolExample, null, 2); // Pretty print the JSON string
167 } else {
168 return `Tool ${toolName} not found.`;
169 }
170}
171
172tools.getToolExample = {
173 state: () => 'available',

Callers 1

tools.tsFile · 0.85

Calls 1

getFunctionSignatureFunction · 0.85

Tested by

no test coverage detected