wait_for_condition
Waits until a selected Android element appears or disappears, the expected app is foreground, a shell command exits, or the UI stabilizes, replacing blind sleep calls with condition-based polling.
Instructions
Wait for exists/gone/foreground/shell-exit-and-output/stable UI. Missing UI transport never counts as 'gone'. Replaces blind sleep calls.
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": {
"condition": "<condition>"
},
"name": "wait_for_condition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| condition | Yes | ||
| poll_interval | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||