Skip to main content
Glama

image_prune

DestructiveIdempotent

Remove unused local Docker images to reclaim disk space. Filter by dangling, until, or label to target specific images.

Instructions

Remove unused local images to reclaim disk space.

Without filters removes only "dangling" images — untagged layers not referenced by any tag or container. To remove all images not used by any container (including tagged ones) pass filters={"dangling": False}. Valid filter keys: dangling (bool as string "true"/"false"), until (RFC3339 timestamp or duration like "24h"), label (key or key=value). Use system_df first to see how much space is reclaimable.

args: filters - Narrow which images to remove; omit to remove dangling images only returns: dict - {"ImagesDeleted": [...], "SpaceReclaimed": }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo
Behavior5/5

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

Annotations already indicate destructiveHint=true, and the description adds valuable context: only unused images are removed, default is dangling images, removal is idempotent (as per annotations), and return data includes ImagesDeleted and SpaceReclaimed. No contradictions.

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 concise (4 sentences) and well-structured: main purpose, default behavior, filter explanation with example, suggestion of related tool, and parameter/return info. Every sentence adds value without redundancy.

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?

Given the tool's complexity (filters, return data) and lack of output schema, the description covers return format and references system_df for pre-check. It provides sufficient detail for an agent to understand when and how to use the tool, including filter semantics.

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 input schema has no description for the 'filters' parameter (0% coverage), but the description compensates fully, detailing valid filter keys (dangling as string bool, until as timestamp/duration, label as key/value) and providing usage examples. This adds essential meaning beyond the schema.

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 the verb (Remove), resource (unused local images), and goal (reclaim disk space). It distinguishes from sibling tools like container_prune, volume_prune, and buildx_prune by focusing on images. The explanation of default behavior (dangling images) and filter options provides specificity.

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 explains default behavior and how to use filters to remove all unused images, including example and valid filter keys. It suggests using system_df to check reclaimable space first. While it doesn't explicitly state when not to use the tool (e.g., for specific image removal), the context is clear for its intended purpose.

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/GavinLucas/docker-mcp'

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