get_ui_tree
Retrieves a simplified flat list of current screen UI elements with coordinates, text, and state, plus optional filters to reduce noise for mobile UI inspection and targeting.
Instructions
Get a simplified flat list of UI elements on the current screen. Each element includes type, text, center coordinates (for tapping), size and state flags. Supports optional filters to reduce noise.
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": "get_ui_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | No | Target platform. Inferred if omitted. | |
| device_id | No | Device ID. Omit for the connected device. | |
| force_full | No | Return the tree even when it is identical to the last read. Default: false | |
| type_filter | No | Only return elements whose type contains one of these strings (case-insensitive). E.g. ["Button", "EditText", "TextView"] | |
| max_elements | No | Maximum elements to return; the rest is summarized. Default: 120 | |
| only_clickable | No | If true, only return clickable elements. Default: false | |
| only_with_text | No | If true, only return elements with non-empty text. Default: false | |
| dump_timeout_ms | No | How long to keep retrying the UI dump on an animating screen. Default: ~5s of progressive backoff | |
| resource_id_contains | No | Only return elements whose resource_id contains this substring (case-insensitive) |