You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android_get_ui_tree returns the raw uiautomator dump XML. A busy screen costs thousands of tokens, and most nodes carry nothing the agent can read or act on. Agents then skip the tree and guess from screenshots.
Acceptance criteria
The default output is a compact tree. It keeps the hierarchy, actionable ancestors, and every node with text, a label or a resource id. Raw XML stays available as an option.
Bounds stay in pixels for taps, and the output reports the screen density so dp can be derived.
The output has an explicit size limit and says when it truncates.
Fixtures from Android Settings, a Flutter app and a Compose app keep their actionable labels and hierarchy. The PR records token counts before and after.
An empty tree is reported as empty. The output does not claim the window is secure.
Checklist
Compare the snapshot modes in callstack/agent-device first. Reuse its approach, or wrap its CLI only if serial selection, install and session isolation fit.
Compact format and size limit
Fixtures and token measurements
Tool description and docs
Out of scope: ref-based taps. File them as a follow-up if agents need them.
Activity