Skip to main content
Glama

Remove Docker Container

docker_container_remove
Destructive

Permanently deletes a Docker container on Unraid, force-killing it if running; optionally removes its image. Requires explicit confirmation since deletion is irreversible.

Instructions

Permanently deletes a container; force-kills it if running (no graceful stop); irreversible. with_image also attempts to delete the image (best-effort — may report success without deleting a shared/in-use image). Requires confirm: true. Needs Unraid OS 7.3+. To stop a container and keep it, use docker_container_action instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "docker_container_remove"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesContainer id from docker_container_list.
confirmNoSet `true` only after the user approves this specific change; otherwise the tool refuses or prompts them.
with_imageNo`true` also attempts to delete the container's image (best-effort).
response_formatNo`detailed` returns full JSON instead of readable text.concise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.3
    • addedInput schema / properties / confirm / description
      Added value: +"Set `true` only after the user approves this specific change; otherwise the tool refuses or prompts them."
    • addedInput schema / properties / id / description
      Added value: +"Container id from docker_container_list."
    • addedInput schema / properties / response_format / description
      Added value: +"`detailed` returns full JSON instead of readable text."
    • addedInput schema / properties / with_image / description
      Added value: +"`true` also attempts to delete the container's image (best-effort)."
  2. First observedv0.1.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well past that: force-kill with no graceful stop, irreversibility, the best-effort image deletion that can falsely report success on shared/in-use images, and the confirm requirement. These are exactly the failure modes an agent needs before calling a destructive tool.

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?

Four dense clauses in roughly thirty words, front-loaded with the permanence warning before the caveats and the alternative. No sentence is filler; the version requirement and sibling routing are appended compactly.

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?

For a destructive, no-output-schema tool this covers what an agent needs: what is destroyed, what is not graceful, what is irreversible, what optional flags actually do, and what precondition must hold. Return-value behavior is delegated to the response_format enum in the schema, which is appropriate.

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 100%, so baseline is 3, but the description earns an extra point by adding meaning the schema lacks: with_image is best-effort and may claim success without actually deleting a shared or in-use image, and confirm is framed as a hard requirement rather than a suggestion. The id and response_format parameters are left entirely to the schema, which is acceptable given full coverage.

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 ("Permanently deletes a container") and immediately distinguishes scope from the sibling it is not: stopping a container is routed to docker_container_action. An agent can separate this from docker_container_list/logs/update without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the explicit alternative for the common adjacent need ("To stop a container and keep it, use docker_container_action instead"), plus the confirmation precondition and an OS version gate. Both the when-to-use and the when-to-use-something-else cases are covered.

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