webpage_snapshot
Read the page as a structured tree of what is on it — works on BOTH iOS Safari and Android Chrome. START HERE before acting: each line is role "name" [ref=eN], and that ref goes straight into webpage_click / webpage_type / webpage_hover, so you never have to guess a CSS selector or read markup. Refs address the live element, so they survive markup that shifted and reach elements no selector can. Shows only what is actually visible by default, and marks disabled / checked / expanded state and current field values. Pass interactiveOnly:true for just the things you can act on, or a selector to scope it to one region of a large page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Device UDID / serial (iOS or Android) | |
| limit | No | Maximum nodes to return (default: 400, max: 2000) | |
| pageId | No | Target page/tab id — auto-picked when omitted | |
| socket | No | Android only: abstract unix socket name (default: chrome_devtools_remote) | |
| selector | No | CSS selector to scope the snapshot to (default: the whole page) | |
| includeHidden | No | Include elements that are not visible (default: false) | |
| interactiveOnly | No | Only links, buttons, fields and other actionable roles (default: false) | |
| platformVersion | No | Ignored (kept for compatibility) |