node_wait
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
| Name | Required | Description | Default |
|---|---|---|---|
| until | No | ready | |
| id_or_name | Yes | ||
| poll_interval | No | ||
| timeout_seconds | No |