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

Function textOf

packages/hosts/mcp/src/tool-server.test.ts:161–162  ·  view source on GitHub ↗
(result: Awaited<ReturnType<Client["callTool"]>>)

Source from the content-addressed store, hash-verified

159
160/** Extract the first text content from a callTool result. */
161const textOf = (result: Awaited<ReturnType<Client["callTool"]>>): string =>
162 (result.content as Array<{ type: string; text: string }>)[0].text;
163
164const STUB_TOOL_ADDRESS = ToolAddress.make("tools.test.org.main.t");
165const TEST_IMAGE_MIME_TYPE = "image/png";

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected