Skip to main content
Glama

volume_prune

DestructiveIdempotent

Remove Docker volumes not referenced by any container to reclaim disk space. Apply label or all filters to target specific unused volumes, including anonymous ones.

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
Behavior4/5

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

Annotations already mark this as destructive and idempotent. The description adds useful nuance about what counts as 'unused' (stopped containers still protect a volume), the default anonymous-only behavior, and the return payload. It doesn't cover permission requirements or confirmation behavior, but the annotations plus added context are sufficient.

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 front-loaded with the core purpose, then elaborates on edge cases, filter keys, and pre-conditions in a structured way. The args/returns section at the end is clearly labeled. Every sentence provides actionable information without waste.

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?

Despite having no output schema, the description explicitly states the return dict shape (VolumesDeleted and SpaceReclaimed). It covers usage context, default behavior, filter semantics, and sibling tool coordination (volume_list, container_prune), making it self-sufficient for correct selection and invocation.

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 coverage is 0% and the only parameter (filters) has no schema description. The description fully compensates by explaining that filters narrow which unused volumes to remove, omitting removes all anonymous ones, and listing valid filter keys (label, all) with their syntax and semantics.

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 specific verb and resource: "Remove volumes not referenced by any container, running or stopped." It clearly scopes the operation (unused volumes only) and distinguishes it from sibling tools like volume_remove and container_prune.

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?

It explicitly tells when to use it versus alternatives: volumes used by stopped containers survive, so remove the container first or use container_prune first. It also advises using volume_list to see what exists and explains filter key usage, including the all key's default behavior.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/L337-org/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server