snapshot
Capture compressed accessibility snapshots of web pages with ref IDs for automated browser interaction. Use refs like $('e1').click() to execute actions, track page updates with diff mode, and filter results with search patterns.
Instructions
Get compressed accessibility snapshot with ref IDs.
Returns: DOM tree with [ref=e1], [ref=e2] etc. Use refs with execute tool: await $('e1').click() Call again after navigation (refs become stale).
Options:
compress: Enable smart compression (default: true) Reduces token usage by ~90% via list folding and wrapper removal.
search: Search pattern (string or regex) to filter results with context
showDiff: Show changes since last snapshot (useful for tracking page updates)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compress | No | Whether to compress the snapshot using smart outline | |
| search | No | Search pattern (string or regex) to filter snapshot results | |
| showDiff | No | Show diff since last snapshot call |