wait_until
Waits until a condition on a tool’s answer holds. It calls tool with args every intervalMs until the value at pointer in the answer meets the expectation (equals, notEquals, exists, atLeast or atMost), or timeoutMs runs out. Use it for a state no event marks: a creature dead, the party’s health back, a mode gone. To wait for an event, use wait_for.
The answer includes held, the last value, tries and waitedMs, and unmet or lastError when the condition did not hold. A failed call (for example while the game loads) counts as not yet.
Read-only: it changes nothing in the game. A call may take up to timeoutMs milliseconds, 30000 by default.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
tool | string | yes | The tool to call, by name (not wait_until or scenario). |
args | object | The tool’s arguments. Default: none. | |
pointer | string | Where to look in the tool’s answer, as a JSON pointer like “/health/current”. Default “”: the whole answer. | |
equals | any | Holds when the value equals this. | |
notEquals | any | Holds when the value is anything but this. | |
exists | boolean | Holds when there is (true) or is not (false) a value at pointer. | |
atLeast | number | Holds when the value is a number at least this. | |
atMost | number | Holds when the value is a number at most this. | |
intervalMs | integer (≥ 50, ≤ 60000) | How often to call the tool, in milliseconds. Default 250. | |
timeoutMs | integer (≥ 0, ≤ 300000) | How long to wait, in milliseconds. Default 30000. |
Call it as wait_until over MCP, or POST /api/tool/wait_until with the arguments as JSON.