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

Function textOf

e2e/src/surfaces/mcp.ts:197–206  ·  view source on GitHub ↗
(result: unknown)

Source from the content-addressed store, hash-verified

195}
196
197const textOf = (result: unknown): string => {
198 const content = (result as { content?: Array<{ type: string; text?: string }> })?.content;
199 if (Array.isArray(content)) {
200 return content
201 .filter((part) => part.type === "text")
202 .map((part) => part.text)
203 .join("\n");
204 }
205 return typeof result === "string" ? result : JSON.stringify(result);
206};
207
208interface TokenResponse {
209 readonly access_token?: string;

Callers 1

callFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected