Skip to main content
Glama

browser_snapshot

Captures a page’s accessibility tree as indented text with refs for actionable nodes, helping agents understand unfamiliar pages and act reliably by passing refs to click or fill tools.

Instructions

Accessibility tree of the page as indented text, with [ref=e12] on every actionable node. The fastest way to understand an unfamiliar page, and the stable way to act on it: pass the ref to browser_click or browser_fill instead of writing CSS. Refs belong to one snapshot — once the page changes, take a new one rather than reusing an old ref.

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": "browser_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
frameIdNoRead this frame instead of the main document (from browser_frames)
maxNodesNoCap on nodes walked before truncating (default 600)
interactiveOnlyNoOnly actionable nodes — no headings, landmarks or paragraphs (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.5.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does substantial work: it discloses the output format, that refs are snapshot-scoped, and that stale refs must not be reused after a page change. It omits practical traits such as truncation behavior when the node cap is hit and the relative cost of large pages.

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

Conciseness5/5

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

Three tight sentences, each earning its place: what it returns, why to prefer it and what to do with refs, then the ref lifecycle caveat. Format and the critical invalidation rule are front-loaded.

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 no annotations, the description still conveys the return shape and the ref semantics an agent needs to act correctly, while the schema handles parameter detail. Only failure-mode behavior (truncation, frames) is left implicit.

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%, with frameId, maxNodes, and interactiveOnly each documented inline including defaults, so the baseline is 3. The description's phrase 'every actionable node' only loosely gestures at interactiveOnly and adds no syntax or trade-off guidance beyond the schema.

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?

States a specific resource and return shape: the accessibility tree as indented text with `[ref=e12]` markers on actionable nodes. That is concrete enough to separate it from browser_html, browser_screenshot, or browser_extract without opening any 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?

Gives clear context — 'the fastest way to understand an unfamiliar page' — and an explicit downstream pattern: pass refs to browser_click or browser_fill instead of writing CSS. It also tells the agent when to re-take a snapshot. It stops short of naming exclusions, e.g. when browser_html or browser_screenshot would be preferable.

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