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

Function executeJson

e2e/scenarios/openapi-update-spec.test.ts:116–126  ·  view source on GitHub ↗
(session: McpSession, code: string)

Source from the content-addressed store, hash-verified

114
115/** Run the agent tool and approve its catalog-changing action. */
116const executeJson = (session: McpSession, code: string) =>
117 Effect.gen(function* () {
118 let result = yield* session.call("execute", { code });
119 let guard = 0;
120 while (result.text.includes("executionId:") && guard < 10) {
121 result = yield* session.approvePaused(result.text);
122 guard += 1;
123 }
124 expect(result.ok, `execute completed (got: ${result.text.slice(0, 400)})`).toBe(true);
125 return JSON.parse(result.text) as Record<string, unknown>;
126 });
127
128scenario(
129 "OpenAPI · updating the spec rebuilds tools without re-adding the integration",

Callers 1

Calls 1

callMethod · 0.80

Tested by

no test coverage detected