get_ui_tree
Retrieves the current UI hierarchy from an Android device or iOS simulator as structured JSON, enabling screen inspection and debugging of mobile apps.
Instructions
Get the current UI hierarchy from an Android device or iOS simulator. Returns a structured JSON representation of the screen content with snapshot metadata and incremental delta signals when available. Successful observations include snapshot_session_id and snapshot_revision for same-device conditional input. Compact errors preserve the error and cannot authorize an expectation. Returns evidence metadata with acquisition intervals and conservative freshness. Optional actionRef links a known same-session/device action; unavailable references collect independently. Device log times are not comparable with host dispatch times.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | Device Serial (Android) or UDID (iOS). Defaults to connected/booted device. | |
| platform | Yes | Platform to get UI tree for | |
| actionRef | No | ||
| responseMode | No | debug | |
| sinceSnapshotRevision | No |