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

Function getFunctionSignature

src/modules/tools.ts:147–153  ·  view source on GitHub ↗
(func: (...args: unknown[]) => unknown)

Source from the content-addressed store, hash-verified

145
146// Helper function to extract function signature
147function getFunctionSignature(func: (...args: unknown[]) => unknown) {
148 const funcString = func.toString();
149 const signatureMatch = /(function\s.*?\(.*?\))|((\w+|\((.*?)\))\s*=>)/.exec(
150 funcString
151 );
152 return signatureMatch ? signatureMatch[0] : 'function signature not found';
153}
154
155// Function to extract the tool object as an example, including the function signatures
156function extractToolExample(toolName: string) {

Callers 1

extractToolExampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected