Wait For Element
android_wait_for_elementWaits for a UI element to appear on an Android screen, replacing fixed sleeps when content loads dynamically. Returns element info and center coordinates once found.
Instructions
Wait until a UI element appears on screen. Use this instead of a fixed sleep when content loads dynamically. Returns element info and center coordinates when found.
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": "android_wait_for_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Match by exact visible text | |
| device | No | Device id (serial or host:port). Optional -- when omitted, uses ANDROID_MCP_DEVICE env or auto-selects the connected device (physical devices preferred over emulators). | |
| timeout | No | Max seconds to wait. Defaults to 10. | |
| className | No | Match by class name, e.g. 'android.widget.Button' or just 'Button' | |
| resourceId | No | Match by resource id. Short ids like 'btn_login' are auto-expanded using the foreground app package | |
| contentDesc | No | Match by accessibility label / content description (substring, case-insensitive) | |
| textContains | No | Match by substring of visible text (case-insensitive) |