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

Function outputItemContent

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

Source from the content-addressed store, hash-verified

424 isRecord(item) && item.type === "content" && isMcpContentBlock(item.content);
425
426const outputItemContent = (item: ExecuteOutputItem): ContentBlock[] => {
427 if (isFileOutputItem(item)) {
428 return outputFileContent(item.file);
429 }
430 if (isContentOutputItem(item)) {
431 return [item.content];
432 }
433 return [{ type: "text", text: "Invalid execution output item omitted." }];
434};
435
436const toMcpOutputResult = (
437 result: FormattedExecuteInput,

Callers

nothing calls this directly

Calls 3

isFileOutputItemFunction · 0.85
outputFileContentFunction · 0.85
isContentOutputItemFunction · 0.85

Tested by

no test coverage detected