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

Function textFromCall

e2e/local/toolkits-mcp.test.ts:138–143  ·  view source on GitHub ↗
(result: Awaited<ReturnType<Client["callTool"]>>)

Source from the content-addressed store, hash-verified

136};
137
138const textFromCall = (result: Awaited<ReturnType<Client["callTool"]>>): string => {
139 const blocks = result.content ?? [];
140 const text = blocks.find((block) => block.type === "text")?.text;
141 if (typeof text !== "string") throw new Error(`MCP call returned no text block`);
142 return text;
143};
144
145const executeJson = async (client: Client, code: string): Promise<Record<string, unknown>> => {
146 const result = await client.callTool({

Callers 1

executeJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected