Skip to main content
Glama

wait_for_container_healthy

Read-only

Poll a container until its healthcheck reports healthy, with configurable timeout and poll interval. Returns health status and timeout flag.

Instructions

Poll a container until its healthcheck reports healthy (or it stops, or the timeout elapses).

Complements wait_container (which waits for exit): this waits for a running container to become healthy. Re-inspects every poll_intervals, never blocks past timeout (no exception on timeout — the result carries timed_out: true).

Health comes from the container's HEALTHCHECK. With none defined, once the container is running the tool returns promptly with health: null and healthy: false (false = "not confirmed healthy", not "unhealthy" — check health to tell them apart). A container that exits before becoming healthy returns its terminal status and healthy: false.

args: id_or_name - The container id or name timeout - Max seconds to wait before returning timed_out (default 120) poll_interval - Seconds between re-inspections (default 2, > 0); also capped by the time left, so a large value can't push the total wait past timeout returns: dict - {"container", "healthy", "health", "status", "waited_seconds", "timed_out"}; health is "starting"/"healthy"/"unhealthy" or null when no healthcheck is defined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
id_or_nameYes
poll_intervalNo
Behavior5/5

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

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description details polling behavior, timeout handling (no exception, timed_out flag), healthcheck dependency, and edge cases like no healthcheck or container exit. No contradiction.

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 description is well-structured: purpose, contrast, behavior, args, returns. It is front-loaded and efficient, though slightly verbose in places. Still earns a 4.

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?

Given the tool's complexity (polling, healthcheck, timeout) and absence of output schema, the description covers all necessary scenarios and return fields, making it fully complete for agent invocation.

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 fully documents all three parameters: id_or_name, timeout (default, meaning), poll_interval (default, >0 constraint, cap by time left). It adds meaning beyond raw schema.

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's purpose: polling a container until its healthcheck reports 'healthy' or it stops or timeout elapses. It explicitly distinguishes from sibling 'wait_container' by contrasting waiting for healthy vs exit.

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?

It provides explicit when-to-use guidance by naming 'wait_container' as an alternative and explaining the difference. It also covers timeout and container exit scenarios, giving clear usage context.

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