page.snapshot
Capture an accessibility-tree view of interactive elements with stable refs for deciding what to click, or emit a Playwright aria-snapshot dialect for assertions.
Instructions
Accessibility-tree snapshot of the interactive elements, each with a stable ref (eNN) usable by page.click and friends. Cheaper and more reliable than screenshots for deciding what to click. format:"aria" instead emits Playwright's aria-snapshot dialect for a toMatchAriaSnapshot assertion - refless, and it leaves existing refs alone.
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": "page.snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Default "refs". "aria" is a draft for a toMatchAriaSnapshot assertion and must be run once before it is trusted. | |
| max_nodes | No | ||
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| root_selector | No | Scope the walk to this subtree, e.g. "main". Keeps a large hidden SEO block from eating the whole node budget. | |
| interactive_only | No |