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

Function deliverArtifact

packages/hosts/mcp/src/tool-server.ts:1640–1650  ·  view source on GitHub ↗
(input: {
      readonly code: string;
      readonly artifactId: string;
      readonly title: string;
    })

Source from the content-addressed store, hash-verified

1638 };
1639
1640 const deliverArtifact = (input: {
1641 readonly code: string;
1642 readonly artifactId: string;
1643 readonly title: string;
1644 }): McpToolResult => {
1645 const url = config.artifactUrl?.(input.artifactId);
1646 if (appsSupported()) return renderedInAppResult({ ...input, url });
1647 return url
1648 ? renderedAsLinkResult({ url, artifactId: input.artifactId, title: input.title })
1649 : renderedWithoutSurfaceResult({ artifactId: input.artifactId, title: input.title });
1650 };
1651
1652 /**
1653 * Bind the integration roles an artifact's code uses, at create time.

Callers 2

saveAndDeliverArtifactFunction · 0.85
showArtifactFunction · 0.85

Calls 4

appsSupportedFunction · 0.85
renderedInAppResultFunction · 0.85
renderedAsLinkResultFunction · 0.85

Tested by

no test coverage detected