Read the on-screen UI tree
android_dump_uiDump the current screen's view hierarchy as text, including tap coordinates for each element, so agents can identify UI elements and tap them directly without guessing pixel positions from screenshots.
Instructions
Dump the current screen's view hierarchy as text, with tap coordinates for every element.
This is the cheap way for an agent to see what is on screen. It gives exact text, resource ids and content descriptions, plus a centre point for each node that can be passed straight to android_tap — no guessing at pixel positions from a screenshot.
By default only meaningful nodes are returned (anything with text, a content description, a resource id, or that is clickable). Layout containers are dropped.
Args:
serial (string, optional): target device
include_all (boolean): return every node including empty containers (default: false)
filter (string, optional): case-insensitive substring; keeps only nodes whose text, id or description matches
response_format ('markdown' | 'json')
Returns: { "count": number, "nodes": [ { "index": number, "class": string, // e.g. "android.widget.Button" "text": string, "desc": string, // content-description "id": string, // resource-id "clickable": boolean, "center": [number, number], // pass to android_tap "bounds": string // "[left,top][right,bottom]" } ] }
Examples:
Use when: you need to press a button and must know where it is -> filter="submit"
Use when: verifying a screen shows the expected text after a change
Use when: a screenshot is ambiguous and you want the literal string values
Don't use when: you need to see rendering, colour or layout quality (use android_screenshot)
Error Handling:
"could not get idle state" means the UI is still animating; wait briefly and retry
WebView content is often opaque to uiautomator; a screenshot may be the only option there
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Keep only nodes whose text, resource id or description contains this string. | |
| serial | No | Device serial from android_list_devices. Optional when exactly one device is connected; required when several are. | |
| include_all | No | Include layout containers and other nodes with no text or id. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |