Skip to main content
Glama
docker-mcp
by falkenslab

Remove an image

remove_image
DestructiveIdempotent

Deletes a local Docker image, with optional force removal when a stopped container uses it; the server confirms before deleting and does nothing if declined.

Instructions

Remove a local image (with force, even if a stopped container uses it). It has to be pulled or built again to be used. The server asks the person to confirm it, naming what goes; if they say no, nothing is done.

Input Schema

NameRequiredDescriptionDefault
forceNo
imageYesThe image's name or id, as its list gives it

Output Schema

NameRequiredDescriptionDefault
removedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds real context beyond the destructiveHint annotation: it discloses a confirmation prompt that names what will be removed and that declining is a no-op, plus the recovery cost of re-pulling/rebuilding. The confirmation flow is not expressible in the annotations and is genuinely helpful.

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?

Three short sentences, front-loaded with the action, then the recovery consequence, then the confirmation behavior. No filler; each clause carries operational meaning.

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?

Output schema exists so return values need not be explained, and annotations already cover safety/idempotency. The description fills the remaining gaps: confirmation UX, decline behavior, and the re-pull/rebuild consequence. Complete for a two-param destructive tool.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%; the image param is documented in the schema as 'name or id, as its list gives it', and the description compensates for the undocumented force param by explaining it removes even in-use images. It leaves the force default (false) to the schema, so it is strong but not exhaustive.

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?

States a specific verb and resource ('Remove a local image') and scopes it against the sibling removes (container, volume, network) by qualifying the target as an image. An agent can distinguish it from remove_container/prune without opening the schema.

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?

Explains the force case ('even if a stopped container uses it') and the consequence of removal ('has to be pulled or built again'). It does not explicitly route to alternatives such as prune for bulk cleanup, so it stops short of full when/when-not guidance.

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