Skip to main content
Glama

remove_container

Destructive

Remove a Docker container after capturing its full inspect data for audit; no undo. Use dry_run=True to preview before deletion.

Instructions

[WRITE][risk=high] Remove a container (captures full inspect first). No undo.

The complete inspect JSON is captured before deletion for the audit trail; there is no clean inverse for a removed container. Pass dry_run=True to preview.

Args: container_id: Container id or name. force: Force-remove a running container (SIGKILL). remove_volumes: Also remove anonymous volumes attached to it. dry_run: If True, preview without removing. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
forceNo
targetNo
dry_runNo
container_idYes
remove_volumesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds substantial context beyond them: the full inspect JSON is captured before deletion for the audit trail, there is no clean inverse, and force implies SIGKILL semantics. These are exactly the operational details an agent needs before an irreversible action.

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?

Front-loads the write/risk tag and the irreversibility warning ahead of the args list, so the most important information lands first. The Args block partially restates schema property names, but each entry adds real semantics, so the redundancy is minor and earned.

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?

For a destructive tool with no output schema, the description covers irreversibility, audit behavior, preview mode, and all five parameters. It stops short of describing post-conditions or error behavior (e.g., removing a nonexistent container), which is the only remaining gap.

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 description coverage is 0% across 5 parameters, so the description carries the full burden — and it does: container_id accepts an id or name, force maps to SIGKILL on a running container, remove_volumes targets anonymous volumes, dry_run previews, and target selects the config target. Each parameter gains meaning not present in 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?

States a specific verb and resource ('Remove a container') with an explicit risk/op type prefix, and the parenthetical '(captures full inspect first)' plus 'No undo' separates it from reversible siblings such as stop_container or restart_container.

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?

Gives clear usage context ('No undo', 'Pass dry_run=True to preview'), which tells the agent when this tool is appropriate versus a safe preview. It does not, however, explicitly name stop_container or other non-destructive alternatives that would be the right choice when removal is not intended.

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