write_artifact
Update an existing mutable artifact's content, preserving each write as a version for rollback.
Instructions
Write a new iteration of a mutable artifact — a git commit on the living document.
The artifact is updated to the new content in place (its URL never
changes), and the write is kept as a version you can list with
artifact_history and revert to. Only artifacts saved with mutable=true
accept writes; an immutable artifact returns an error telling you to
re-create it as mutable. React/JSX is auto-detected and re-wrapped, exactly
like save_to_hypervault. Writing content identical to the current version
is a no-op (returns unchanged: true, no new commit).
Typical loop: read_artifact(ref) → modify the returned content → write_artifact(ref, new_content, message="what changed").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The artifact's slug or full URL. | |
| title | No | Optional new title (omit to keep the current one). | |
| content | Yes | The full new HTML or React/JSX source (replaces the current content; max 1 MB). | |
| message | No | Optional commit message describing the change (default "edit"). It shows up in artifact_history. | |
| force_html | No | Pass true to store the content as plain HTML even if it looks like JSX (skips auto-wrapping). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||