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

Function deliverArtifact

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

Source from the content-addressed store, hash-verified

1777 };
1778
1779 const deliverArtifact = (input: {
1780 readonly code: string;
1781 readonly artifactId: string;
1782 readonly title: string;
1783 }): McpToolResult => {
1784 const url = config.artifactUrl?.(input.artifactId);
1785 if (appsSupported()) return renderedInAppResult({ ...input, url });
1786 return url
1787 ? renderedAsLinkResult({ url, artifactId: input.artifactId, title: input.title })
1788 : renderedWithoutSurfaceResult({ artifactId: input.artifactId, title: input.title });
1789 };
1790
1791 /**
1792 * The shared back half of `create-artifact` and `edit-artifact`: everything

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