Publish Artifact
artifact-publishPublish an artifact — deploys its committed files (git HEAD; uncommitted edits are not included) to a live public URL. Works for app AND markdown artifacts; an asset artifact cannot be published (tell the user so and share its artifactUrl instead).
Publishing makes the content PUBLIC to the world. It is NOT needed for sharing — the artifact is already visible at its artifactUrl to everyone who can reach it, and liveUrl is NOT an editor. Call this only when the user explicitly asked to publish/deploy; otherwise share that URL and offer publishing as a follow-up question.
Requires a sessionId from a previously created artifact (via artifact-create).
What goes live:
app: the running web application.
markdown: one document. liveUrl renders the initial file (README.md if present, else the first .md lexicographically); the raw source is at /index.md (Content-Type: text/markdown) — give the user that path when they want the markdown. Other .md files are served raw at their own paths, each with a rendered .html sibling. ```mermaid fences render as diagrams; the .md keeps the fence. accTitle/accDescr label a diagram.
Modes:
"webapp" (default): Deploys to a live URL; use it for both app and markdown artifacts. Returns { success, liveUrl, subdomain }.
"designSystem": NOT available over MCP — always fails with an enterprise contact link, whatever you pass. Do not offer it as a capability.
Returns: { success, liveUrl, subdomain }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Deploy mode: "webapp" publishes to a live URL (for app and markdown artifacts alike), "designSystem" publishes as an npm package. | webapp |
| sessionId | Yes | The session ID of the artifact to publish (returned by artifact-create). | |
| packageName | No | [designSystem mode only] NPM package name. Required when mode is "designSystem". | |
| packageVersion | No | [designSystem mode only] NPM package version. Required when mode is "designSystem". |