Skip to main content
Glama

docker/manage

Destructive

Start, stop, restart, kill, pause, unpause, or remove a Docker container by name or ID to control its lifecycle.

Instructions

Changes a container's lifecycle: start, stop, restart, kill, pause, unpause or remove; the container counterpart of services/manage. Mutating. Only containers in the grant's containers: list may be touched (name and ID are both checked; an empty list refuses everything). Always runs as root: no privileged argument, refused unless the grant has allowed: true. stop uses Docker's default 10 s grace. remove is irreversible for the container and deliberately fenced: it never sends force or volume removal, so a running container is refused (stop or kill it first) and anonymous volumes are kept. start on a running or stop on a stopped container reports unchanged, not an error. container is a name, full ID or ID prefix. Text: Container NAME (ID12): stop succeeded.; output_format: json returns container, id, action and result (ok or unchanged). For bulk cleanup use docker/prune, to run a command inside docker/exec, to check state first docker/containers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
containerYesContainer name, full ID or ID prefix
output_formatNojson returns container, id, action, result; default is text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds what annotations provide: authorization model (name and ID checked, empty list refuses everything, runs as root, no privileged argument, requires allowed: true), the 10 s stop grace, and remove's deliberately fenced behavior (never sends force or volume removal, running container refused, anonymous volumes kept). This is exactly the mutation context an agent needs, which annotations alone (destructiveHint=true) cannot supply.

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

Conciseness4/5

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

Front-loaded with purpose and action list, then layered constraints, edge cases, output format, and sibling routing. Dense but nearly every clause carries unique information; slightly long for a 3-parameter tool.

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?

With no output schema, the description supplies both the text format ('Container NAME (ID12): stop succeeded.') and the JSON fields (container, id, action, result). Authorization, irreversibility, and no-op semantics are all covered, leaving nothing an agent needs to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so container/output_format semantics are already documented. The description restates 'container is a name, full ID or ID prefix' and the JSON return fields, adding little beyond the schema; baseline 3 is correct when the schema does the heavy lifting.

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?

Opens with a specific verb and resource ('Changes a container's lifecycle') and enumerates all seven actions. It explicitly positions itself as 'the container counterpart of `services/manage`', so an agent can distinguish it from the sibling without opening either 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?

Explicit routing at the end: bulk cleanup → docker/prune, run a command → docker/exec, check state first → docker/containers. It also states preconditions (grant containers list, allowed: true) and the no-op cases ('start on a running or stop on a stopped container reports unchanged').

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