页面快照
browser_snapshotCaptures a structured accessibility snapshot of the active browser tab as a YAML-style tree with stable element refs, so agents can inspect pages and target elements for click or type actions.
Instructions
Capture a structured accessibility snapshot of the active tab as a YAML-style tree. Interactive elements carry [ref=eN] ids; pass a ref to browser_click / browser_type / browser_select_option to act on them. Snapshots are incremental: unchanged page returns a one-line reply, small changes return only the changed region, and refs stay stable across snapshots. Pass full:true to force a complete tree (automatic after navigation or large changes). For very long pages, pass maxNodes to page through the tree: the response reports totalLines and nextCursor; pass cursor on the next call. Paging still assigns refs for the whole tree, so refs from any page remain usable.
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 |
|---|---|---|---|
| full | No | Force a full snapshot instead of incremental (default false) | |
| tabId | No | Tab id (default: active tab) | |
| cursor | No | Line offset for a paged snapshot, from the previous response nextCursor (default 0) | |
| maxNodes | No | Page size: max lines to return per call (1–2000). Omit for the normal full/incremental snapshot. |