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 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

NameRequiredDescriptionDefault
whyNoRequired 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.
keepNoHow many of the newest old versions to keep besides the current one (default 0).
artifactIdYesThe artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.
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. 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"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructive/idempotent, and the description adds context beyond them: nothing goes to the trash (true irreversibility), versions used by a task's review round are kept regardless of `keep`, and pruning affects the owner's storage accounting. This is exactly the extra behavioral detail an agent needs before a destructive call.

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?

Front-loaded with the core action and retention rule, then edge cases. It is dense and each sentence carries information, though the storage-accounting clause is slightly tangential to invocation correctness.

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

Completeness4/5

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

Covers the destruction semantics, the retention exception, the error case, and names the `keptInUse` return field despite an output schema existing. What is left unexplained (the `why` parameter, revision conflict) is fully documented in the schema.

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 baseline is 3, but the description adds real meaning: it explains what `keep` means in context (default 0 = only the current one) and the in-use override that the schema never mentions. This goes beyond the field descriptions rather than repeating them.

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

Purpose5/5

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

States the specific verb and resource ('Permanently delete an artifact's old versions') plus the retention rule, which distinguishes it from artifact_version_delete (single version) and artifact_versions (listing). An agent can tell exactly what this does without opening the schema.

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?

Gives a clear conditional ('prune only when your person asks') and an explicit exclusion ('A table has rows, not versions (INVALID_TYPE)'). It does not name artifact_version_delete or trash_purge as alternatives, so the routing is implied rather than spelled out.

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.