Take page snapshot
take_snapshotRead a page as compact, searchable text with stable element IDs, enabling reliable clicks, fills, and other actions. Use it to inspect page structure and obtain valid IDs for interaction.
Instructions
Read the page as compact text, with a uid for every element.
This is the primary way to see a page, and the source of the uids that click, fill, hover, drag and upload_file all take. Prefer it over take_screenshot for anything but a genuine visual check: it is searchable, far smaller, and it is what makes interaction possible at all.
The output is the accessibility tree — roles, names, values and states,
indented by nesting — with Chrome-internal and purely presentational nodes
filtered out unless verbose is set.
A URL on the same origin as the page is printed relative to it — the root node carries the absolute one, so nothing is lost and a link-dense page costs noticeably less to read.
uids stay stable across snapshots for elements that did not change, but any page change can invalidate them. Whenever a tool reports "unknown uid", take a fresh snapshot and use the new uid. Output is capped at 200 000 characters.
Frames are included and marked, so an element inside an iframe gets a uid like any other and click, fill and evaluate_script work on it unchanged.
For plain page text without uids, get_page_content is cheaper; to find elements by CSS selector, use query_selector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| verbose | No | Return the complete accessibility tree, including nodes normally filtered out as noise and containers that are otherwise collapsed. Much larger — use it only when an element you need is missing from the default output. | |
| file_path | No | Write the snapshot to this local path instead of returning it — useful for very large pages you intend to search rather than read in full. | |
| include_frames | No | Also read the page's iframes and splice each one in under the element that hosts it. On by default, because Chrome's accessibility tree stops at a frame boundary and anything inside an iframe would otherwise be invisible. Set false on a page with many frames to keep the output small. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |