wait_for
Halts browser actions until specified page conditions—text, selector, URL, page change, or network idle—are met, returning the first match or an error on timeout.
Instructions
Wait until one of the given conditions holds; the first match wins and is named in the reply. A timeout is an error. Conditions: text appears, text_gone disappears, a CSS selector is visible, the URL contains a substring (or matches a * pattern), the page changed, the network is idle.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Wait for the tab's URL to contain this, or to match it when it has * wildcards. | |
| text | No | Wait for this text on the page (case-insensitive). | |
| tabId | No | Tab to act on, from tabs_context. Omitted: this session's active tab. Pass it always when several agents share the session. | |
| selector | No | Wait for a CSS selector to be visible. | |
| text_gone | No | Wait until this text is no longer on the page (a spinner, 'Loading...'). | |
| timeout_s | No | Seconds to wait (default 10). | |
| network_idle | No | Wait for no request in flight for 500 ms. | |
| page_changed | No | Wait for the page to change (navigation, DOM size, text). |