Skip to main content
Glama

container_stop

Stop a running container with a graceful shutdown. Send its stop signal, then SIGKILL after a timeout if it does not exit.

Instructions

Gracefully stop a running container (its configured stop signal, then SIGKILL after a timeout).

Prefer this over container_kill for a clean shutdown: the main process receives the container's stop signal (STOPSIGNAL, default SIGTERM) and has stop_timeout_seconds to exit before the daemon force-kills it. Use container_restart to stop and start again in one call, or container_pause to freeze processes without stopping. When the server runs containerized it refuses to stop its own container.

args: id_or_name - The container id or name stop_timeout_seconds - Seconds between the stop signal and SIGKILL (default 10) returns: dict - The container's attrs after the stop (exit code under State.ExitCode)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes
stop_timeout_secondsNo
Behavior5/5

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

With annotations (readOnlyHint=false, destructiveHint=false), the description adds valuable context: the stop signal flow, the timeout before SIGKILL, and the limitation about stopping its own container. No contradiction with annotations.

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: title line states the purpose, followed by contextual guidance, then an args/returns section. No unnecessary words; every sentence serves a purpose. Front-loaded with the primary action.

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 explains the return value (dict with exit code under State.ExitCode). Together with parameter explanations, usage guidance, and behavioral notes, it fully equips the agent to choose and invoke the tool correctly.

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 has no descriptions (0% coverage), so the description fully compensates by explaining each parameter: id_or_name as the container id/name, stop_timeout_seconds with its meaning and default. This is essential and crystal clear.

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 uses a specific verb ('stop') and resource ('running container'), and immediately clarifies the full behavior ('configured stop signal, then SIGKILL after a timeout'). It distinguishes itself from sibling tools like container_kill and container_restart by name and intended use.

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?

Explicit guidance: says 'Prefer this over container_kill for a clean shutdown', recommends container_restart to stop and start again, container_pause to freeze without stopping. Also warns that the server refuses to stop its own container when containerized. This is exactly what the dimension asks for.

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