Skip to main content
Glama

Stop container

docker_stop_container

Stops a running Docker container by container ID, with optional timeout and context selection for managing different environments.

Instructions

Invoke the stop_container operation.

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": {
      "container_id": "<container_id>"
    },
    "name": "docker_stop_container"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
timeoutNo
container_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

D1.8/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the safety profile is covered by structured data. The description adds nothing beyond that, and notably fails to explain that stopping sends SIGTERM then SIGKILL after the timeout, which is exactly the kind of behavioral detail annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with no filler is technically concise, but here brevity is under-specification rather than efficiency. There is no front-loaded statement of effect or scope for the agent to anchor on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with three parameters, partial schema coverage, and no output schema, the description should carry real weight. Instead it leaves the required container_id semantics, the timeout behavior, and the multi-context pool usage entirely unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%: context has a description, but container_id (the required parameter) and timeout (default 10) are undocumented in the schema and untouched by the description. The description does not compensate, so the agent gets no explanation of what timeout means or what form container_id takes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Invoke the stop_container operation" restates the tool name and title without adding a verb/resource statement of its own. It conveys only that some container gets stopped, and gives no signal that distinguishes it from docker_remove_container or the sibling k8s_stop_container / podman_stop_container variants.

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

Usage Guidelines1/5

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

There is no when-to-use or when-not-to-use guidance, no prerequisite context (running container required?), and no mention of alternatives such as docker_remove_container or the podman/k8s equivalents. The agent must infer everything from the name alone.

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

Deploy Server

Other Tools