Skip to main content
Glama

docker_prune

Cleans up unused Docker containers, images, networks, volumes, and build cache by showing a preview first. Confirm execution to delete the listed resources.

Instructions

Clean up unused things. what: containers (stopped), images (unused, untagged only), networks (unused), volumes (not used by any container), builder (build cache).

Destructive. Shows a preview first. Run again with confirm=true after the user says yes.

Input Schema

NameRequiredDescriptionDefault
hostNo
whatYes
confirmNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses the critical behaviors: it is destructive, it shows a preview first, and it requires a two-step confirmation. It does not elaborate on irreversibility or exactly what the preview contains, but for a prune tool these disclosures cover the main risks.

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 purpose, followed by a compact enumeration of 'what' values and the confirmation workflow. Every sentence and fragment earns its place; there is no redundancy or filler.

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?

Given that an output schema exists, the description need not explain return values, and it adequately covers the destructive nature and required confirmation. The only gap is the undocumented 'host' parameter, but the core usage for a prune operation is otherwise complete.

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

Parameters3/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. It thoroughly defines the 'what' parameter by listing each accepted value with clarifications (e.g., 'containers (stopped)', 'volumes (not used by any container)') and explains the 'confirm' workflow. However, the 'host' parameter is never mentioned, leaving one of three parameters undocumented.

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 description states a clear action ('Clean up unused things') and enumerates the resource types affected (containers, images, networks, volumes, builder), making the tool's scope specific. It distinguishes itself from targeted siblings like docker_remove by being a bulk prune operation, though the opening phrase is slightly generic before the enumeration.

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 explicit procedural guidance: 'Shows a preview first. Run again with confirm=true after the user says yes.' This tells the agent exactly how to sequence the call and when to seek confirmation. It does not name sibling alternatives such as docker_remove for selective cleanup, but the destructive workflow is clearly scoped.

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