get_dom_snapshot
Capture a structured DOM snapshot with element references to find selectors before clicking, typing, or hovering. Pass refs like e5 directly to interaction tools.
Instructions
Get a structured DOM snapshot with element references (e.g., e1, e2, e3). When to use: BEFORE any interaction tool (click, type_text, etc.) to find the right selector or element ref. Returns elements with tag, text, attributes, and position data. Element refs like 'e5' can be passed directly to click, type_text, hover, and other tools. Related: read_page (quick text content), click/type_text/hover (use refs from this snapshot). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | No | Optional. Tab id this read targets. Omit when the calling agent owns exactly one tab; required to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this. | |
| maxElements | No | Maximum elements to include (default: 2000) |