ui_tree
Extracts the accessibility tree of an Android app's windows, including hidden or unfocused displays, to inspect UI elements, states, and tap coordinates for automation or debugging.
Instructions
The accessibility tree of the windows on an app's display: one line per element with class, text, hint, description, #resource-id, state flags, @center coordinates to tap and bounds, all in display pixels. Works on hidden and unfocused displays. Hides layout-only and off-screen elements unless all_nodes.
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": "ui_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | No | App to act on. An app in its own window or hidden display is found by package; otherwise Waydroid's main display is used. | |
| all_nodes | No | ||
| display_id | No | Android display id instead of a package; 0 is Waydroid's main display. |