take_snapshot
Capture a text snapshot of a page's accessibility tree, listing elements with unique IDs to inspect page state. Use it to identify the element selected in DevTools and guide further actions.
Instructions
Take a text snapshot of the target page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pageId": "<pageId>"
},
"name": "take_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | Targets a specific page by ID. | |
| verbose | No | Whether to include all possible information available in the full a11y tree. Default is false. | |
| filePath | No | The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response. |