Skip to main content
Glama

browser_snapshot

Read-only

Captures a page as an indented accessibility tree with element refs, enabling agents to inspect actionable elements and scope large pages by ref or selector instead of screenshots.

Instructions

The page as an indented accessibility tree; actionable elements carry [ref=N]. Cheaper and more exact than a screenshot. Scope big pages with ref or selector.

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
refNoref from browser_snapshot
grepNoInstead: the text passages with these words
textNoVisible text/label, instead of ref
limitNoMax lines (2000)
selectorNoCSS selector, instead of ref
full_textNoUncut texts, names and values

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.1
    • addedInput schema / properties / grep
      Added value: +{
      +  "description": "Instead: the text passages with these words",
      +  "type": "string"
      +}
  2. Changed6 schema fields changedv0.9.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / full_text / description
      Previous value: -"Texts, names and values uncut"New value: +"Uncut texts, names and values"
    • changedInput schema / properties / limit / description
      Previous value: -"Max lines (default 2000)"New value: +"Max lines (2000)"
    • changedInput schema / properties / ref / description
      Previous value: -"Element ref from browser_snapshot, e.g. 12"New value: +"ref from browser_snapshot"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector (first match), instead of ref"New value: +"CSS selector, instead of ref"
    • changedInput schema / properties / text / description
      Previous value: -"Visible text or label of the element, instead of ref"New value: +"Visible text/label, instead of ref"
  3. First observedv0.7.1

TDQS

A3.8/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safety profile, and the description still adds real context: the output is an indented tree, actionable nodes are tagged with refs that feed later calls, and the result is cheaper/more exact than a screenshot. It does not mention truncation behavior or how refs expire between snapshots, but against an annotated read-only tool this is solid added value.

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 short sentences, front-loaded with what the tool returns, then the cost comparison, then the scoping tip. Every sentence carries information and there is no filler.

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 read-only snapshot tool with no output schema and fully documented parameters, this covers the essentials: output shape, ref semantics, and how to narrow large pages. The only gap is that it never says the emitted refs are the inputs expected by interaction siblings, which an agent must infer.

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 coverage is 100%, so baseline is 3. The description adds a little beyond the schema by framing ref/selector as scoping mechanisms for big pages, but never touches grep, text, full_text, or limit, and does not explain how the 'instead of ref' alternatives interact. Marginal lift over a fully documented schema.

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?

The description states a concrete verb+resource: it returns the page as an indented accessibility tree with [ref=N] markers on actionable elements. It implicitly separates itself from screenshot-based inspection ('cheaper and more exact than a screenshot') and, by surfacing refs, from mutation siblings like browser_click. It does not explicitly contrast with siblings such as browser_more or browser_evaluate, so a 4 rather than a 5.

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

Usage Guidelines3/5

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

There is useful implied guidance: prefer this over a screenshot for cost and exactness, and scope large pages using ref or selector. What is missing is explicit routing among siblings — nothing says when to reach for browser_more, browser_evaluate, or browser_scroll instead. The guidance is implied rather than stated.

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