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

Function invokeByAddressCode

e2e/scenarios/openapi-unknown-args.test.ts:63–69  ·  view source on GitHub ↗
(address: string, args: unknown)

Source from the content-addressed store, hash-verified

61 });
62
63const invokeByAddressCode = (address: string, args: unknown) => `
64const segments = ${JSON.stringify(address)}.split(".").slice(1);
65let node = tools;
66for (const segment of segments) node = node[segment];
67const result = await node(${JSON.stringify(args)});
68return JSON.stringify(result);
69`;
70
71type ToolEnvelope = {
72 readonly ok: boolean;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected