Snapshot interactive DOM
browser_snapshotInspect a controlled page's interactive elements, including open Shadow DOM, and assign short refs for clicking or typing; optionally return visible page text.
Instructions
Inspect the controlled page's interactive elements (including open Shadow DOM), assigning short element refs (e1, e2, ...) usable by browser_click, browser_type, etc., plus optional visible page text.
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 |
|---|---|---|---|
| tabId | No | Controlled tab id (defaults to active controlled tab). | |
| selector | No | Optional CSS selector to scope the snapshot root instead of document. | |
| includeText | No | Include trimmed visible page text (default true). | |
| maxElements | No | Maximum interactive elements to return (default 150, max 500). | |
| maxTextChars | No | Maximum visible text characters to return (default 4000). |