Skip to main content
Glama

image_prune

DestructiveIdempotent

Remove unused local Docker images to reclaim disk space. Omit filters to delete dangling images only, or pass filters to remove all images not used by containers.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive and idempotent behavior, but the description adds substantial nuance: the default only removes dangling images, the dangling=false filter expands scope, and valid filter keys and formats are enumerated. This goes well beyond what annotations alone convey.

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

Conciseness4/5

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

The description is appropriately detailed and front-loaded with the core purpose. There is slight redundancy between the prose explanation and the Args section, but every sentence communicates necessary operational detail.

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?

With no output schema, the description still specifies the return shape. It covers default behavior, filtering options, filter key formats, and a prerequisite check via system_df. An agent has enough information to invoke this tool correctly.

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%, so the description carries the full burden for the filters parameter. It explains that omitting filters means dangling-only, and details valid keys (dangling, until, label) with their value formats. This is strong compensation for the bare 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 opens with a specific verb and resource: 'Remove unused local images to reclaim disk space.' It clearly distinguishes from related tools like image_remove and image_prune_builds by focusing on unused local images and pruning semantics.

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 explains when to use the default behavior versus passing filters, and explicitly recommends using system_df first to assess reclaimable space. It does not name sibling alternatives directly, but the usage context is clear enough for an agent to select this tool.

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