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

Function textOf

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

Source from the content-addressed store, hash-verified

176}
177
178const textOf = (result: unknown): string => {
179 const content = (result as { content?: Array<{ type: string; text?: string }> })?.content;
180 if (Array.isArray(content)) {
181 return content
182 .filter((part) => part.type === "text")
183 .map((part) => part.text)
184 .join("\n");
185 }
186 return typeof result === "string" ? result : JSON.stringify(result);
187};
188
189interface TokenResponse {
190 readonly access_token?: string;

Callers 1

callFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected