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

Function outputItemContent

packages/hosts/mcp/src/tool-server.ts:387–395  ·  view source on GitHub ↗
(item: ExecuteOutputItem)

Source from the content-addressed store, hash-verified

385 isRecord(item) && item.type === "content" && isMcpContentBlock(item.content);
386
387const outputItemContent = (item: ExecuteOutputItem): ContentBlock[] => {
388 if (isFileOutputItem(item)) {
389 return outputFileContent(item.file);
390 }
391 if (isContentOutputItem(item)) {
392 return [item.content];
393 }
394 return [{ type: "text", text: "Invalid execution output item omitted." }];
395};
396
397const toMcpOutputResult = (
398 result: FormattedExecuteInput,

Callers

nothing calls this directly

Calls 3

isFileOutputItemFunction · 0.85
outputFileContentFunction · 0.85
isContentOutputItemFunction · 0.85

Tested by

no test coverage detected