browser_snapshot
Capture a compact, token-efficient snapshot of the active page with numbered interactive elements, smart labels, headings, and accessible iframes; optionally scope by CSS selector or viewport.
Instructions
Capture a compact, token-efficient snapshot of the active page showing interactive elements with numbered references (@1, @2, ...), smart labels (icons/images/CSS backgrounds), headings, and accessible iframes. Supports scoping to a CSS selector and viewport-only filtering.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| passive | No | If true, captures snapshot purely via native CDP Accessibility domain without executing any JavaScript in the page. | |
| selector | No | Optional CSS selector to scope snapshot to a specific DOM container | |
| in_viewport | No | If true, only include elements currently visible in viewport | |
| max_elements | No | Maximum interactive elements to include (truncates remainder to save tokens) |