android_get_ui_tree
Reads interactive Android UI elements from the live Shadow DOM stream or uiautomator XML fallback, enabling deterministic automation to inspect the current screen hierarchy without screenshots.
Instructions
Reads interactive Android UI elements from the sub-millisecond Kotlin Shadow DOM stream (falls back to uiautomator XML if daemon stream is cold).
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_get_ui_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_serial | No | Optional ADB device serial. Defaults to the first connected device. |