Page snapshot
snapshotReads a controlled task-space page as an accessibility tree with @refs, or extracts text, lists, tables, and label-value pairs for inspection and data extraction; read-only.
Instructions
Text snapshot (accessibility tree with @refs) of a page in a task space you control (default: its active page). For an overview use format "summary" (fields with dropdown options, buttons, links). To read data use "text", "list" with a selector (one line per item), "tables" or "pairs" (JSON). Output is cut at max_chars. Read-only; stops if the user has control. In a script, print page.snapshot() last instead.
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": {
"space_id": "<space_id>"
},
"name": "snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page label such as p1 (default: the active page). | |
| delta | No | tree only: just the lines that changed since your last snapshot of this page (refs of other lines still hold). Whole tree the first time, after a URL change and every 5th call. | |
| limit | No | list only: items returned (default 100). | |
| format | No | tree (default): accessibility tree with @refs for acting. summary: short overview (title, headings, form fields with selectors, values and dropdown options, buttons, links, start of the text). text: visible text of the page or of `selector`. list: visible text of every element matching `selector`, one line each. text, list and summary include the values of visible input/select/textarea fields in place (amounts in read-only inputs); password and other secret fields never give their value. tables: JSON of every <table> and ARIA grid/table (or the one at `selector`): headers and rows keyed by header. pairs: JSON label–value pairs from <dl>, <label for>, aria-labelledby, aria-label on fields and th+td rows. Both read only the page's markup (nothing guessed from layout) and say so when the structure is absent. | |
| layers | No | tree only: first list the popups and layers covering the page (kind, coverage, close button, protected or not). Nothing is closed. | |
| selector | No | CSS selector. text: the element to read (default body). list: the repeated items, required (e.g. "#list tr", ".product-card"). | |
| space_id | Yes | Task space id (from list_spaces or an earlier script). | |
| full_page | No | tree only: whole document instead of the viewport. | |
| max_chars | No | tree: characters returned, cut at a line (default 20000, up to the user's limit, 100000 unless they changed it); text, tables, pairs: characters returned (default 4000, tables/pairs 12000; up to 20000); summary: characters of page text (default 1500, up to 20000). |