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

Function invokeByAddressCode

e2e/scenarios/oauth-refresh-on-401.test.ts:129–135  ·  view source on GitHub ↗
(address: string, args: unknown)

Source from the content-addressed store, hash-verified

127 });
128
129const invokeByAddressCode = (address: string, args: unknown) => `
130const segments = ${JSON.stringify(address)}.split(".").slice(1);
131let node = tools;
132for (const segment of segments) node = node[segment];
133const result = await node(${JSON.stringify(args)});
134return JSON.stringify(result);
135`;
136
137type ToolEnvelope = {
138 readonly ok: boolean;

Callers 1

callFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected