Skip to main content
Glama

compose_down

Destructive

Stop and remove containers, networks, and optionally volumes for a Docker Compose project. Clean up resources defined in your compose file with this teardown command.

Instructions

Stop and remove containers, networks (and optionally volumes) for a compose project.

Inverse of compose_up. Images are kept; named volumes go only with volumes=True (destructive). Use compose_stop to stop without removing anything. Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.

args: project_dir - Dir with the compose file (default: server cwd; copied to the target host if no local plugin) files - Explicit compose file paths (repeatable, -f) project_name - Compose project name override profiles - Profiles to consider volumes - Also remove named volumes declared by the project (destructive) remove_orphans - Remove containers not declared in the compose file timeout_seconds - Subprocess timeout (default 300s) returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
volumesNo
profilesNo
project_dirNo
project_nameNo
remove_orphansNo
timeout_secondsNo
Behavior4/5

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

Annotations already mark this as destructive, but the description adds valuable specifics: images are kept, named volumes are only removed when `volumes=True`, and the tool does not raise on non-zero CLI exit (inspect `returncode`/`stderr`). This goes beyond the annotation by explaining the exact scope of destruction and error handling behavior.

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?

The description is compact and front-loaded with the core action, then gives usage context, a behavioral note, and an efficient arg list. Every sentence earns its place; there is no redundant information or filler, and the structure makes it easy to scan.

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?

Despite having no output schema, the description explicitly documents the return dict format. It covers the action, alternatives, destructive behavior nuances, all parameters, and the error-handling contract, making it self-sufficient for an agent to decide when to use the tool and how to interpret results.

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?

The input schema has no descriptions (0% coverage), but the description's `args` section provides meaningful one-line explanations for all 7 parameters, including flags like `-f` and the default timeout. This compensates well for the schema's lack of detail, though the explanations are concise rather than deeply detailed.

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 clearly states the tool stops and removes containers and networks for a compose project, with an optional destructive volumes flag. It explicitly differentiates itself from `compose_up` by calling this the inverse and from `compose_stop` by specifying the removal behavior, making its purpose unambiguous.

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?

The description gives explicit guidance on when to use this tool versus alternatives: it says to use `compose_stop` when you want to stop without removing anything, and it notes that it is the inverse of `compose_up`. This provides clear decision-making context that is absent in many tool descriptions.

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