wait_for_change
Monitor Labgrid resources and places for changes. Long-poll until a change occurs or timeout expires, then return a cursor indicating whether it changed. Ideal for live monitoring without busy-polling.
Instructions
Long-poll for the next place/resource change (design §11.12 -- the live-monitor substitute; FastMCP has no subscription surface).
``cursor=None`` bootstraps: returns the coordinator's current change
cursor immediately, with ``changed=false`` (no waiting) -- call this
once to get a starting point, then pass the returned ``cursor`` back
on later calls. Otherwise blocks (event-driven, no busy-polling)
until the cursor advances past ``cursor``, or ``timeout_s`` elapses,
whichever comes first, then returns the current cursor and whether it
changed. ``timeout_s`` is clamped to at most 25.0 regardless of what
is requested, to stay under typical MCP client request timeouts --
this assumes the caller's own MCP client timeout is set higher than
25s; a lower client timeout just means the client gives up first and
the orphaned poll on our side finishes harmlessly on its own.
Read-only and idempotent: it never mutates anything, and repeated
calls with the same arguments are safe to retry. Registered
unconditionally, like the other read tools -- available even in
readonly mode. The change cursor is process-local and resets to 0 on
server restart (design §11.12); a cursor value held from a previous
process is simply stale and self-heals after at most one full
``timeout_s`` -- the next call either sees an already-advanced
cursor (``changed=True``) or times out and returns the current one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | ||
| timeout_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||