get_ui_tree
Extracts the current Android screen’s semantic UI control tree, returning indexed elements with text, IDs, coordinates, and interaction flags so agents can target taps precisely without screenshots.
Instructions
【核心感知工具 - 替代慢速截图】通过高速 RPC 提取当前屏幕的语义化 UI 控件树。
返回每个元素的 [#index] 编号、类名、文本 (text)、描述 (desc)、id、中心坐标与可交互标志 (flags)。
后续可直接调用 tap_element(index=N) 或 tap_element(text="...") 精准操作!
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 可选过滤关键词(匹配 text、desc、resource-id 或类名),留空返回全部 | |
| max_elements | No | 最多返回的元素数量,默认 100 | |
| only_interactive | No | 是否只返回有文本或可交互(可点击/可输入/可滚动)的控件。默认 True 过滤无意义布局容器 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |