MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / invokeByAddressCode

Function invokeByAddressCode

e2e/scenarios/tool-call-contract.test.ts:91–97  ·  view source on GitHub ↗
(address: string, args: unknown)

Source from the content-addressed store, hash-verified

89 );
90
91const invokeByAddressCode = (address: string, args: unknown) => `
92const segments = ${JSON.stringify(address)}.split(".").slice(1);
93let node = tools;
94for (const segment of segments) node = node[segment];
95const result = await node(${JSON.stringify(args)});
96return JSON.stringify(result);
97`;
98
99/** The ToolResult envelope every sandbox tool call resolves to. */
100type ToolEnvelope = {

Callers 2

invokeEnvelopeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected