Skip to main content
Glama

stop_container

Destructive

Stop a running container gracefully with a timeout, preview via dry-run, and record prior state for undo.

Instructions

[WRITE][risk=medium] Stop a running container. Inverse: start it.

Captures whether it was running so the harness records a start undo. Pass dry_run=True to preview.

Args: container_id: Container id or name. timeout: Seconds to wait for graceful stop before killing (default 10). dry_run: If True, preview without stopping. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
timeoutNo
container_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, but the description adds real value beyond them: it explains that prior running state is captured so the harness can record a start undo, and it exposes a non-destructive dry_run preview. It also clarifies the timeout is the graceful-stop window before a kill. It does not say what happens when the container is already stopped.

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?

The operation class and purpose are front-loaded in the first line, followed by a tight Args block. The only waste is dry_run being described twice (inline and in the Args list), but overall it is well-sized for a 4-parameter write tool.

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

Completeness4/5

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

For a mutating tool with no output schema, the description covers parameters, safety class, undo capture, and a preview mode, which is most of what an agent needs. The remaining gap is behavior on an already-stopped container and how errors surface, but the essential calling information is present.

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?

With 0% schema description coverage, the description carries the full burden and does so: container_id is defined as id-or-name, timeout is given units, default, and kill semantics, dry_run is explained, and target is described as a config name that can be omitted. Each of the four parameters gains meaning beyond the bare schema types.

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?

States a specific verb+resource ("Stop a running container") and pre-empts the sibling ambiguity by naming the inverse operation (start_container). The [WRITE][risk=medium] tag classifies the operation class up front, so an agent can distinguish it from restart_container or remove_container without opening the schema.

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

Usage Guidelines3/5

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

It names the inverse action and advertises a dry_run preview path, which implies the safe-exploration flow, but it never states when to prefer stop over restart_container or when stopping is inappropriate. Usage is implied rather than stated.

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