ui_wait_for
ui_wait_forPolls a JavaScript expression until it returns true or the timeout elapses, so you can wait for page rendering instead of repeatedly retrying assertions.
Instructions
Poll a JS expression until it becomes true or the timeout elapses. Use this to wait for the page to render instead of retrying ui_assert. Returning true is recorded as one action; timing out fails the session.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"condition": "<condition>"
},
"name": "ui_wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition | Yes | JS expression evaluated in the page context | |
| timeoutMs | No | How long to keep polling before giving up (max 60000ms) | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |