Browser Wait
browser_waitWaits for a page element to reach a specified state, such as visible or hidden, using a CSS selector and timeout to synchronize UI actions.
Instructions
Wait for an element to reach a specific state. IMPORTANT: Only useful with a selector - calling without a selector is pointless because MCP round-trip time already provides natural delays. Good uses: wait for element to appear (state='visible') or loading spinner to disappear (state='hidden'). Args: selector = CSS selector to wait for, timeout = max wait in ms, state = 'visible'/'hidden'/'attached'/'detached'.
Session parameter:
session=None (default): Uses primary session ("s1")
session="s2": Targets specific session (for parallel agents)
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": "browser_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Target state ('visible', 'hidden', 'attached', 'detached'). | visible |
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| timeout | No | Max wait time in milliseconds. | |
| agent_id | No | Agent identifier for binding check. Optional. | |
| selector | No | CSS selector to wait for. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| state | No | Element state waited for: 'visible', 'hidden', 'attached', or 'detached' | |
| success | No | Whether the operation succeeded | |
| timeout | Yes | Timeout duration (ISO 8601 format in JSON, e.g., 'PT30S') | |
| selector | No | Selector waited for | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. |