Update artifact content
artifact_updateReplace an artifact's content with text (content), a base64 file (base64Content, filename, mimeType), or edits: up to 50 { find, replace } pairs applied in order to the current text on the server, each find occurring exactly once (else nothing changes), so you send only the passage that changes. The result is a new current version of the artifact's own type. Like a file on a computer, the write replaces the content: the earlier version is kept only when the file's history setting keeps it (its own, its folder's or its workspace's: off by default, the last N, or all) or when you send keepPrevious: true. expectedVersionId (currentVersionId from your last read or receipt) is needed only to replace workspace content another agent or person wrote with content; edits never need it. When sent it is checked, and a stale one is CONFLICT: re-read, then retry with current values. Empty text content is valid. Data that grows by adding records belongs in a table.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"artifactId": "<artifactId>"
},
"name": "artifact_update"
}
}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. | |
| edits | No | Up to 50 { find, replace } pairs applied in order to the file's current text; each find must occur exactly once, else nothing changes. Not with content. | |
| content | No | The new version's text. Not with base64Content or edits. | |
| 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. | |
| keepPrevious | No | Keep the version this write replaces, whatever the file's history setting says (by default a write replaces the content and keeps no earlier version). | |
| base64Content | No | The new version as a base64 file, with filename and mimeType. Not with content. | |
| expectedVersionId | No | The artifact's current version id as you read it (currentVersionId): needed to replace content another agent or person wrote; checked when sent (a stale one is CONFLICT). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| version | Yes | ||
| artifact | Yes |