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

Function deliverArtifact

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

Source from the content-addressed store, hash-verified

2335 };
2336
2337 const deliverArtifact = (input: {
2338 readonly code: string;
2339 readonly artifactId: string;
2340 readonly title: string;
2341 }): McpToolResult => {
2342 const url = config.artifactUrl?.(input.artifactId);
2343 if (appsSupported()) return renderedInAppResult({ ...input, url });
2344 return url
2345 ? renderedAsLinkResult({ url, artifactId: input.artifactId, title: input.title })
2346 : renderedWithoutSurfaceResult({ artifactId: input.artifactId, title: input.title });
2347 };
2348
2349 /**
2350 * 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