Skip to main content
Glama

Page snapshot

snapshot
Read-only

Reads 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

NameRequiredDescriptionDefault
pageNoPage label such as p1 (default: the active page).
deltaNotree 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.
limitNolist only: items returned (default 100).
formatNotree (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.
layersNotree only: first list the popups and layers covering the page (kind, coverage, close button, protected or not). Nothing is closed.
selectorNoCSS selector. text: the element to read (default body). list: the repeated items, required (e.g. "#list tr", ".product-card").
space_idYesTask space id (from list_spaces or an earlier script).
full_pageNotree only: whole document instead of the viewport.
max_charsNotree: 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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond readOnlyHint/openWorldHint it discloses two real behaviors: output is truncated at max_chars, and the call 'stops if the user has control' – a meaningful human-in-the-loop constraint an agent must plan for. It does not describe the failure/return shape when a space is not controlled or when truncation occurs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core resource and then the format menu; nothing is filler. The density of quoted format names makes it slightly list-like, but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and nine parameters, the description still conveys the output shape (tree with @refs, JSON for tables/pairs), truncation limits, and the control-stopping behavior. Gaps are minor: no statement of what happens on a bad selector or when the space is not under the agent's control.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the per-parameter meanings (delta, layers, full_page, max_chars defaults) are already fully documented in the schema. The description mostly restates format intent and truncation rather than adding syntax or edge-case rules the schema lacks, matching the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first clause names a specific verb and resource: a text/accessibility-tree snapshot with @refs of a page in a task space, with the default (active page) stated. The word 'Text' plus the format list makes it distinguishable from the sibling 'screenshot' without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It routes format choice explicitly: 'summary' for an overview, 'text'/'list'/'tables'/'pairs' to read data, with the selector requirement called out for list. It also gives a when-not hint for scripted use ('print page.snapshot() last instead'), but never contrasts itself against screenshot or run_actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.