get_a11y_tree
Get the accessibility tree snapshot of the current page. Returns structured data 77% smaller than a screenshot. Auto-scopes to the main content area on large pages (50K+ chars). Use selector to manually scope to a specific element.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | A CSS selector for an iframe, or a list of them for nested iframes. selector, label and ref then resolve inside it. | |
| page_id | No | The page to act on, from list_pages or pages_opened. Defaults to the current page. Does not change the current page. | |
| selector | No | CSS selector to scope the tree to a specific element (e.g. "#search-results", "main"). If omitted on large pages, auto-scopes to the main landmark. | |
| max_chars | No | Maximum characters to return. Truncates at nearest line boundary. | |
| max_depth | No | Maximum tree depth. Limits nesting to get a structural overview without deep details. | |
| session_id | Yes | Browser session ID | |
| visible_only | No | Only include visible elements. Skips hidden menus, modals, and offscreen content. | |
| exclude_selectors | No | CSS selectors to exclude from the tree (e.g. ["nav", "footer", ".ad-slot"]). Elements are hidden before snapshotting. |