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

Function textOf

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

Source from the content-addressed store, hash-verified

183}
184
185const textOf = (result: unknown): string => {
186 const content = (result as { content?: Array<{ type: string; text?: string }> })?.content;
187 if (Array.isArray(content)) {
188 return content
189 .filter((part) => part.type === "text")
190 .map((part) => part.text)
191 .join("\n");
192 }
193 return typeof result === "string" ? result : JSON.stringify(result);
194};
195
196interface TokenResponse {
197 readonly access_token?: string;

Callers 1

callFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected