Skip to main content
Glama

Delete old artifact versions

artifact_versions_prune
DestructiveIdempotent

Permanently 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

NameRequiredDescriptionDefault
idYesThe artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.
whyNoRequired 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.
keepNoHow many of the newest old versions to keep besides the current one (default 0).
expectedWorkspaceRevisionNoOptional: refuse (CONFLICT) if the artifact changed since this workspaceRevision.

Output Schema

NameRequiredDescriptionDefault
removedYes
keptInUseYes
artifactIdYes
freedBytesYes
versionCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / why / description
      Previous value: -"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."New value: +"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."
  2. Changed3 schema fields changed
    • removedInput schema / properties / artifactId
      Removed value: -{
      -  "description": "The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.",
      -  "maxLength": 300,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "artifactId"
      -]New value: +[
      +  "id"
      +]
  3. Changed2 schema fields changed
    • addedOutput schema / properties / keptInUse
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "artifactId",
      -  "removed",
      -  "freedBytes",
      -  "versionCount"
      -]New value: +[
      +  "artifactId",
      +  "removed",
      +  "freedBytes",
      +  "versionCount",
      +  "keptInUse"
      +]
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and idempotentHint=true, and the description still adds real behavior: deletions bypass the trash and cannot be undone, in-use review-round versions survive regardless of keep, and the keptInUse count reports them. It also discloses a concrete failure mode (INVALID_TYPE for tables, which have rows not versions), which annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Retention semantics are front-loaded in the first two sentences, then consequences, then the type guard — a sensible order with no filler. The storage point is stated twice in compressed form ('Frees storage; every version counts toward the owner's storage'), which is the only mild redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, four-parameter tool with an output schema present, the description covers what is destroyed, what is preserved, irreversibility, and the error case, while return values are already defined by the output schema. Nothing an agent needs before calling it destructively is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description goes beyond it by spelling out that keep=0 leaves only the current version and that the in-use override takes precedence over whatever keep says. The `why` and `expectedWorkspaceRevision` parameters are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause gives a specific verb and resource ('Permanently delete an artifact's old versions') plus the retention rule, which distinguishes it from a single-version delete in substance. It does not explicitly name the sibling it is not (e.g. artifact_version_delete), so an agent must infer the boundary from 'old versions' vs one version.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear selection context ('Frees storage; every version counts toward the owner's storage') and states the retention contract, so an agent knows why to reach for this tool. It stops short of naming an alternative or a when-not condition, leaving the prune-vs-single-delete choice implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.