Skip to main content
Glama

volume_prune

DestructiveIdempotent

Remove unused Docker volumes that are not referenced by any container. Specify filters to narrow which volumes to delete; without filters, only anonymous volumes are removed.

Instructions

Remove volumes not referenced by any container, running or stopped.

A volume used by even one stopped container is not "unused" and survives the prune - remove the container first (or use container_prune, then this) to reclaim its volumes. Valid filter keys: label (key or key=value), all ("true" as a string - without it only anonymous volumes are eligible, matching docker volume prune's default). Use volume_list first to see what currently exists.

Args: filters: Narrow which unused volumes to remove; omit to remove all anonymous ones

Returns: dict: {"VolumesDeleted": [...], "SpaceReclaimed": }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.1
  2. Removedv2.1.4
  3. Addedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as destructive, but the description adds critical behavioral nuance: volumes used by stopped containers survive, the default only targets anonymous volumes, and the filter keys and string form of 'all' are explicitly documented. This goes well beyond the annotation flags and prevents dangerous misunderstandings.

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?

Every sentence in the description adds necessary information: core semantics, edge-case behavior, workflow suggestion, filter details, and return type. The structure separates narrative explanation from args/returns, making it scannable without padding.

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 single-parameter tool with no output schema, the description fully specifies behaviors, filter usage, return format, and prerequisite steps. It even names sibling tools (container_prune, volume_list) to help with workflow composition. No critical information is missing for an agent to correctly invoke this tool.

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?

The schema provides only a bare 'filters' object with zero description coverage FAQs. The description compensates thoroughly by explaining that filters narrow which unused volumes are removed, that omitting it removes all anonymous volumes, and by enumerating valid filter keys (label and all) with their expected value types. This is essential, non-redundant semantic detail.

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 clearly states that volume_prune removes volumes not referenced by any container, and specifies that this includes both running and stopped containers. It distinguishes the prune semantics from a targeted volume removal (volume_remove) by focusing on unreferenced volumes rather than named ones.

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?

The description gives explicit workflow context: remove containers first or use container_prune then this tool, and recommends using volume_list to see current volumes. It could explicitly state 'use volume_remove to remove a specific named volume' as an alternative, but the guidance provided clearly helps an agent decide when to use this prune.

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

Deploy Server

Other Tools