handle_alert
Accept or dismiss blocking system alerts and in-app dialogs by finding the correct button from the UI tree, no coordinates needed. Specify button text for precise taps.
Instructions
Accept or dismiss a blocking alert/dialog (system permission prompts, 'Open in …?' sheets, in-app modals). Finds the right button from the current UI tree — no coordinates needed. Use buttonText for a specific button. Returns what was tapped and what changed; if no alert is present you get the current tree.
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": "handle_alert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Default 'dismiss' (the safe choice) | |
| device | No | Device id from list_devices. Optional when exactly one device is booted. | |
| buttonText | No | Tap this specific button instead of the action vocabulary |