wait_for_element
Waits for an iOS UI element to appear or disappear without tapping, helping confirm screens or spinners after an action; optionally scrolls while searching.
Instructions
Wait until an element appears, or disappears with gone=true, without tapping it. Use it after an action to wait for a screen or for a spinner to go away; use tap_element to wait and tap. Pass at least one of text, id or type. Returns the element's description and center, and fails when the timeout (5 s by default) passes. With scrollDirection it scrolls the screen while looking.
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_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Exact accessibility identifier | |
| gone | No | Wait for the element to disappear instead (default false) | |
| text | No | Case-insensitive. Exact matches on label, identifier, value or placeholder rank first, then whole-word matches inside a short label, identifier or placeholder | |
| type | No | Element type, e.g. Button, TextField, Cell, Switch | |
| exact | No | Require an exact text match | |
| index | No | Pick the Nth best match (0-based) | |
| device | No | Device UDID or name substring. Defaults to the select_device choice, then IOS_DEVICE_MCP_DEVICE, else the single USB-connected device. | |
| timeout | No | Seconds to wait for the element (default 5) | |
| maxScrolls | No | Scroll attempts when scrollDirection is set (default 8) | |
| scrollDirection | No | If not found, scroll this way and look again (lists load lazily, so off-screen rows may not exist yet) |