Skip to main content
Glama

wait_container

Read-only

Wait for a container to stop and retrieve its exit information. Use this to synchronize workflows dependent on container completion.

Instructions

Block until a container stops, then return its exit info.

The default timeout is finite (600s) so the call can't block the MCP server indefinitely on a container that never reaches condition. When the timeout is exceeded a RuntimeError is raised (poll get_container instead, or pass a larger timeout). Pass timeout=None to restore the old unbounded behavior — only do so if you are sure the wait will complete.

args: id_or_name - The container id or name timeout - Maximum seconds to wait before raising (default 600; None waits forever) condition - State to wait for: "not-running" (default), "next-exit", or "removed" returns: dict - The wait result with StatusCode and Error keys

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
conditionNonot-running
id_or_nameYes
Behavior5/5

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

Discloses blocking behavior, finite default timeout to prevent indefinite blocking, and the effect of different timeout values. Adds context beyond readOnlyHint and destructiveHint 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 with a clear purpose, timeout rationale, parameter list, and return type. Every sentence adds value without redundancy.

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?

Comprehensive coverage: purpose, all parameters, behavior details, return format, and usage guidance. No missing information for a 3-parameter tool without output schema.

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?

All three parameters (id_or_name, timeout, condition) are clearly described with types, defaults, and allowed values. Schema coverage is 0%, so the description fully compensates.

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 blocks until a container stops and returns its exit info. It distinguishes from sibling tools like 'wait_for_container_healthy' by focusing on stop conditions.

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?

Explicitly explains when to use (wait for container to stop), default timeout behavior, and provides alternatives like polling get_container or increasing timeout. Warns against using timeout=None unless certain.

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/GavinLucas/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server