Browser Accessibility Snapshot
browser_snapshotCapture a compact accessibility-tree snapshot of a page for browser automation, returning refs for interactive elements and optional diffs to track changes after actions.
Instructions
Get a compact accessibility-tree view of the page: interactive and semantic elements (links, buttons, inputs, headings, landmarks) as a small indented text list, each tagged with a stable ref like [ref=e12]. Far cheaper than browser_get_dom for finding what to interact with — use this first when exploring an unfamiliar page. Every ref is also a valid CSS selector — pass [data-mcp-ref="e12"] directly as the selector argument to browser_click, browser_type, browser_hover, or browser_select_option. Pass diff:true to get only what changed since your last browser_snapshot call in this session — much cheaper than a full snapshot for checking the result of a click/type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | If true, return only elements added/removed since the last browser_snapshot call for this session, instead of the full tree. First call always returns the full snapshot. | |
| mode | No | Force a specific mode. Defaults to extension. | |
| maxNodes | No | Maximum number of elements to include (default 300). Lower it for a shorter list, raise it for exhaustive coverage of a large page. | |
| sessionId | No | Puppeteer session ID for headless mode. Skips mode selection. |