Skip to main content
Glama

page.snapshot

Read-only

Capture an accessibility-tree view of interactive elements with stable refs for deciding what to click, or emit a Playwright aria-snapshot dialect for assertions.

Instructions

Accessibility-tree snapshot of the interactive elements, each with a stable ref (eNN) usable by page.click and friends. Cheaper and more reliable than screenshots for deciding what to click. format:"aria" instead emits Playwright's aria-snapshot dialect for a toMatchAriaSnapshot assertion - refless, and it leaves existing refs alone.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "page.snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoDefault "refs". "aria" is a draft for a toMatchAriaSnapshot assertion and must be run once before it is trusted.
max_nodesNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
root_selectorNoScope the walk to this subtree, e.g. "main". Keeps a large hidden SEO block from eating the whole node budget.
interactive_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful behavior: refs are stable and reusable by other page.* tools, and aria mode is refless and leaves existing refs untouched. It still omits cost/limits behavior around the node budget and what happens when the tree is truncated.

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?

Dense but front-loaded: the core artifact and ref contract come first, then the alternative mode. The phrase 'and friends' and the final clause about leaving refs alone are slightly compressed in a way that takes a second read but still earn their place.

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?

For a six-parameter, zero-required tool with no output schema, the description does the important work of explaining what comes back (ref-tagged interactive elements) and modes of operation. Remaining gaps are secondary parameter defaults and truncation behavior rather than anything that would cause a misinvocation.

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

Parameters4/5

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

With 67% schema coverage, the description meaningfully expands the most consequential parameter, format, by contrasting refs versus aria outputs and warning that aria is a draft needing a verification run. It says nothing about max_nodes or interactive_only, which remain thin in the schema alone.

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

Purpose4/5

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

Names a specific artifact (accessibility-tree snapshot of interactive elements) and a concrete output contract (stable refs like eNN consumable by page.click). It also distinguishes itself from screenshots, though it says nothing about how it differs from the nearby inspector.snapshot sibling.

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?

Gives a clear selection rule against the obvious alternative: it is cheaper and more reliable than screenshots when deciding what to click, and the aria format is scoped to a toMatchAriaSnapshot assertion. There is no explicit when-not guidance, such as preferring page.observe when live interaction semantics are needed.

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

Deploy Server

Other Tools