Wait for UI
wait_for_uiWait for an Android UI element matching text, content-desc, or resource-id to appear, then retrieve its tap coordinates. Solves flaky automation by polling until the element is visible.
Instructions
Poll the UI until an element containing the given text / content-desc / resource-id appears. Returns its tap coordinates.
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": {
"match": "<match>"
},
"name": "wait_for_ui"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | Yes | Substring to look for in text, content-desc or resource-id | |
| serial | No | Device serial (defaults to session or the only device) | |
| timeoutSeconds | No | Give up after this long (default 15) |