Skip to main content
Glama

node_wait

Read-only

Wait for a Docker swarm node to reach a desired state (ready, down, disconnected, unknown) with configurable timeout and polling interval, returning whether the 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. service_wait covers service convergence; node_list shows every node's state at once.

Args: until: Target Status.State to wait for: "ready" (default), "down", "disconnected", "unknown" timeout_seconds: Max seconds to wait before returning with timed_out=true 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.1

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/destructiveHint annotations, it discloses that it never raises on timeout, always returns 'met' and 'timed_out', polls periodically, and caps poll_interval by remaining time. This materially enriches the agent's behavioral model.

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 front-loaded with the core behavior, then covers timeout behavior, use cases, parameters, and return value in an organized way. Each section contributes useful details without unnecessary repetition.

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 polling utility with no output schema, the description covers return keys, timeout behavior, usage boundaries, and alternatives. The only notable omission is explicit documentation for the required id_or_name parameter, which keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds defaults, valid enum values, and capping behavior for until, timeout_seconds, and poll_interval, which is valuable since schema coverage is 0%. However, it omits the required id_or_name parameter from the Args section, leaving a clear gap for the one parameter an agent must supply.

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 names a specific verb and resource: block until a swarm node's Status.State reaches a target. It also distinguishes itself from sibling tools like service_wait and node_list, so an agent can tell it apart.

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?

Provides concrete common uses ('until=ready' after join, 'until=down' while draining), explicitly states what it does not track, and names service_wait and node_list as alternatives. This gives clear when-to-use and when-not-to-use guidance.

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

Deploy Server

Other Tools