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

Function textOf

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

Source from the content-addressed store, hash-verified

81
82/** Extract the first text content from a callTool result. */
83const textOf = (result: Awaited<ReturnType<Client["callTool"]>>): string =>
84 (result.content as Array<{ type: string; text: string }>)[0].text;
85
86const STUB_TOOL_ADDRESS = ToolAddress.make("tools.test.org.main.t");
87const TEST_IMAGE_MIME_TYPE = "image/png";

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected