Update artifact content
artifact_updateAtomically create a version from text (content) or a base64 file (base64Content, filename, mimeType). The version keeps the artifact's own type. A workspace content update requires expectedVersionId (the artifact's current version id, read from currentVersionId). To change a workspace audience, use artifact_patch. Re-read on conflict, then retry with current values. Empty text content is valid. Every version is stored in full and counts toward the owner's storage; data that grows by adding records belongs in a table. storage_usage shows what is used; artifact_versions_prune removes old versions, only when your person asks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters. | |
| content | No | The new version's text. Not with base64Content. | |
| filename | No | ||
| mimeType | No | ||
| artifactId | Yes | The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL. | |
| description | No | What changed in this version. | |
| base64Content | No | The new version as a base64 file, with filename and mimeType. Not with content. | |
| creatorContext | No | How it was made: the prompt, tool or run. | |
| expectedVersionId | No | The artifact's current version id as you read it (currentVersionId): required for a workspace artifact (a stale one is CONFLICT), optional otherwise. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| version | Yes | ||
| artifact | Yes |