accessibility_tree
Retrieve an application's accessibility UI element tree to inspect buttons, text fields, and other controls. Adjust maxDepth for overview or detailed inspection without relying on screenshots.
Instructions
Get the accessibility UI element tree of an application. Returns a hierarchical tree of all UI elements (buttons, text fields, labels, etc.) with their role, title, value, position, size, and state. This is the primary way to understand what's on screen without relying on screenshots. Use maxDepth to control detail level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Process ID of the app (omit for frontmost app) | |
| maxDepth | No | Maximum depth of the tree (1=shallow, 10=deep). Use 2-3 for overview, 5+ for detailed inspection. (default: 3) |