Skip to main content
Glama

prune_volumes

Remove unreferenced Docker volumes to reclaim disk space, with dry-run preview and optional removal of named unused volumes.

Instructions

[WRITE][risk=high] Prune unreferenced volumes. No undo.

Docker removes only ANONYMOUS unused volumes by default (its behaviour since 23.0); named unused volumes survive unless all_unused is set. The dry_run preview is scoped by the same flag, so it describes the call you are about to make — and when scoped to the default it still reports the named unused volumes it will not touch (alsoUnusedNamed*) rather than hiding that space.

Args: all_unused: Also remove NAMED unused volumes (docker volume prune -a). Irreversible, and named volumes usually hold data someone meant to keep. dry_run: If True, list what would be removed + reclaimable bytes. target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
all_unusedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.3
    • addedInput schema / properties / all_unused
      Added value: +{
      +  "default": false,
      +  "title": "All Unused",
      +  "type": "boolean"
      +}
  2. First observedv0.6.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so excellently. It discloses the destructive nature, the no-undo guarantee, the Docker 23.0 default behavior change, the dry_run preview scoping, and the fact that named unused volumes are reported even when not removed. This is far beyond what annotations would have provided.

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

Conciseness5/5

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

The description is dense but every sentence earns its place. The risk warning is front-loaded, the Docker behavior context is concise, and the parameter explanations are tight. No fluff or repetition.

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 tool with no annotations and no output schema, the description covers the action, the risk, the scope semantics, the preview behavior, and all parameters. An agent has everything needed to decide whether to call it and how to set flags safely.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate for all three parameters. It does: all_unused is explained with the docker flag equivalent and a data-loss warning, dry_run is explained with what it lists, and target is explained as a config target with default behavior. This fully compensates for the schema's lack of descriptions.

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?

The description opens with a clear verb+resource: 'Prune unreferenced volumes' and immediately flags the risk level and irreversibility. It distinguishes itself from sibling tools like dangling_volumes (which lists) and prune_images (which prunes images) by naming the exact resource and behavior.

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

Usage Guidelines5/5

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

The description explicitly explains when to use the tool and how the flags change scope: default prunes only anonymous unused volumes, while all_unused extends to named volumes. It also warns about the irreversibility and the data-loss risk of named volumes, giving clear decision guidance. It doesn't name a specific alternative tool, but the usage context is fully specified.

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