Skip to main content
Glama

node_wait

Read-only

Block until a Docker swarm node's Status.State reaches a target value (e.g., ready, down). Configurable timeout and polling interval. Returns whether condition was met or timed out.

Instructions

Block until a swarm node's Status.State reaches a target value.

Never raises on timeout — the result always carries met and timed_out. Polls Status.State (one of "unknown"/"down"/"ready"/"disconnected") every poll_intervals. Common uses: until="ready" after a newly joined node, or until="down" while draining a node before removal. Does not track task placement — for "has this drained node's workload fully moved off", inspect the relevant services' tasks directly; no single cheap call spans every service in the swarm, so that check isn't built into this tool.

args: id_or_name - The node id or name until - Target Status.State to wait for: "ready" (default), "down", "disconnected", "unknown" timeout_seconds - Max seconds to wait before returning with timed_out=true (default 300) poll_interval - Seconds between re-inspections (default 2, > 0); capped by the time left so a large value can't push the total wait past the timeout returns: dict - {"node", "until", "met", "timed_out", "state", "availability", "waited_seconds"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
untilNoready
id_or_nameYes
poll_intervalNo
timeout_secondsNo
Behavior5/5

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

The description adds significant behavioral context beyond annotations. It states: 'Never raises on timeout — the result always carries met and timed_out.' It explains polling behavior and the capping of poll_interval. Even though annotations declare readOnlyHint=true and destructiveHint=false, the description elaborates on the non-blocking timeout behavior and polling mechanics.

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?

The description is well-structured and concise. It opens with a clear purpose sentence, then covers timeout behavior, common use cases, limitations, and parameter explanations. Every sentence adds value without unnecessary repetition. The formatting with bullet-point-like descriptions for parameters is efficient.

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?

The description provides a complete summary of the return value: 'returns: dict - {"node", "until", "met", "timed_out", "state", "availability", "waited_seconds"}'. It also explains the subtle behavior of polling interval capping and the fact that it never raises on timeout. Given no output schema, this is comprehensive.

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 explains each parameter. It lists id_or_name, until (with enum values and default), timeout_seconds (with default), and poll_interval (with default and constraint >0). It also explains the capping behavior for poll_interval, which the schema does not convey.

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: 'Block until a swarm node's Status.State reaches a target value.' It specifies the action (block/wait), the resource (swarm node's Status.State), and the target condition. This distinguishes it from sibling tools like node_inspect or node_list.

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?

The description provides explicit usage guidance: 'Common uses: until="ready" after a newly joined node, or until="down" while draining a node before removal.' It also clarifies what the tool does not do: 'Does not track task placement... for has this drained node's workload fully moved off, inspect the relevant services' tasks directly.' This helps the agent decide when to use this tool vs. alternatives.

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