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 prune only when your person asks. 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": {
"artifactId": "<artifactId>"
},
"name": "artifact_versions_prune"
}
}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. | |
| keep | No | How many of the newest old versions to keep besides the current one (default 0). | |
| artifactId | Yes | The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL. | |
| 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 |