Skip to main content
Glama

node_wait

Read-only

Wait until a Docker swarm node reaches a specified state (ready, down, disconnected). Returns met/timed_out flags even on timeout for reliable node lifecycle orchestration.

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. service_wait covers service convergence; node_list shows every node's state at once.

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?

Annotations only declare readOnlyHint and destructiveHint, but the description adds crucial behavioral details: it never raises on timeout, always returns met and timed_out, polls at poll_interval, and caps poll_interval by remaining time so a large value cannot exceed timeout. These details inform the agent of failure modes and timing semantics not present in 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?

Though longer than typical descriptions, every sentence is load-bearing: core blocking behavior, timeout semantics, common use cases, task-tracking caveat, parameter list, and return shape. The structure is well-organized with paragraphs and an args block, front-loaded with the essential action.

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?

There is no output schema, so the description's explicit return-field list (node, until, met, timed_out, state, availability, waited_seconds) is essential. Combined with full parameter semantics, timeout/polling behavior, and caveats about task placement, the description is complete for a wait-type tool.

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?

The input schema has 0% description coverage, but the description fully compensates by explaining each parameter: id_or_name, until (with allowed states), timeout_seconds (default 300), and poll_interval (default 2, >0, capped). It adds meaning beyond the schema's bare type and enum definitions.

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 opening sentence precisely states the verb, resource, and target: 'Block until a swarm node's Status.State reaches a target value.' It further distinguishes itself from sibling tools by naming what it does not do (task placement tracking) and pointing to alternatives like service_wait and 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?

Explicit use cases are provided ('until="ready"' after a newly joined node, 'until="down"' while draining a node before removal). The description also states clear exclusions: it does not track task placement, and for that check the agent should inspect services' tasks directly, with service_wait and node_list named as relevant 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/L337-org/docker-mcp'

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