snapshot
Outline a page's interactive elements with roles, names, states, and refs so you can select and act on them; use refs with input tools until navigation.
Instructions
Outlines the page to act on it: one line per element with a role (button, link, textbox, heading...), name, states, value and a ref ([ref=e12]), indented under its parent; an invalid field shows [invalid] [error='why'], a its first 25 options (pick one with fill_input); through open shadow roots and iframes (another origin's frame is [frame=f2], refs f2e5; selector 'f2' outlines it alone); hidden elements left out, passwords never shown; at most 50000 characters (find_in_snapshot searches it whole). Refs work as the selector of the input tools until the page navigates. Same on Chrome and Firefox.
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": "snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Most nesting levels (0 = the top level only). Default: no limit. | |
| tab_id | No | Default: the active tab. | |
| selector | No | Outline only this element (CSS, 'host >>> inner' or a ref). Default: the whole page. | |
| instance_id | No | Default: 'default'. |