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

Function handleFunctionExecution

src/modules/tools.ts:67–85  ·  view source on GitHub ↗
(
  func: FunctionCall,
  tools: ToolCollection
)

Source from the content-addressed store, hash-verified

65export const tools: ToolCollection = {};
66
67export async function handleFunctionExecution(
68 func: FunctionCall,
69 tools: ToolCollection
70): Promise<TaskResult> {
71 try {
72 let funcR: unknown = await tools[func.name].function(func.arguments);
73 funcR = bigIntToString(funcR);
74 const result: TaskResult = {
75 type: 'ToolResult',
76 toolResult: { result: dump(funcR) },
77 };
78 return result;
79 } catch (error) {
80 return {
81 type: 'ToolError',
82 toolResult: { error: JSON.stringify(error) },
83 };
84 }
85}
86
87tools.webBrowser = seleniumBrowser;
88

Callers 1

processFunctionTaskFunction · 0.90

Calls 1

bigIntToStringFunction · 0.90

Tested by

no test coverage detected