Skip to main content
Glama

container_remove

Destructive

Delete a Docker container and its writable layer. Force kill running containers, remove anonymous volumes, but named volumes and image persist.

Instructions

Remove a container, deleting its writable layer.

The image is untouched (image_remove deletes images); named volumes are never removed — volumes=True only covers anonymous ones. A running container is refused unless force=True, which kills it first. When the server runs containerized it refuses to remove its own container.

args: id_or_name - The container id or name volumes - Also remove anonymous volumes (the CLI's --volumes); named volumes persist link - Remove the specified link force - Kill a running container before removing it (default False: running is an error) returns: bool - True after removal completes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkNo
forceNo
volumesNo
id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Despite annotations already marking destructiveHint=true, the description adds substantial context: deletion of the writable layer, refusal to remove running containers without force, and refusal to remove the server's own container when containerized. It also explains volume behavior and force semantics, which are not inferable from annotations alone.

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?

Well-structured: a one-sentence summary, a focused paragraph on key behaviors and edge cases, then a clean arg list and return type. No redundancy or fluff; every sentence provides distinct value.

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?

The description covers the tool's purpose, side effects, edge cases (running containers, own container), parameter semantics, and return value. Given the tool's complexity and 4 parameters, this is complete and self-sufficient.

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%, but the description compensates fully with an 'args' section explaining every parameter: id_or_name, volumes (anonymous only), link, and force (with default). This adds meaning beyond raw schema types and defaults.

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 a container, deleting its writable layer.' It clearly distinguishes from image_remove and clarifies that named volumes are not removed, setting it apart from related tools like volume_remove.

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?

Provides explicit alternatives and limitations: 'the image is untouched (`image_remove` deletes images); named volumes are never removed — volumes=True only covers anonymous ones.' Also states running containers are refused unless force=True, giving concrete usage conditions. This goes beyond vague 'use for removal' guidance.

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

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