Delete old artifact versions
artifact_versions_prunePermanently delete an artifact's old versions, keeping the current one and the newest keep (default 0: only the current one). A version a task's review round uses is kept too, whatever keep says; keptInUse counts them. Frees storage; every version counts toward the owner's storage. Nothing goes to the trash, so a prune cannot be undone. A table has rows, not versions (INVALID_TYPE).
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": {
"id": "<id>"
},
"name": "artifact_versions_prune"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL. | |
| why | No | Required for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters. | |
| keep | No | How many of the newest old versions to keep besides the current one (default 0). | |
| expectedWorkspaceRevision | No | Optional: refuse (CONFLICT) if the artifact changed since this workspaceRevision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| removed | Yes | ||
| keptInUse | Yes | ||
| artifactId | Yes | ||
| freedBytes | Yes | ||
| versionCount | Yes |