Skip to main content
Glama

browser_snapshot

Capture an accessibility tree snapshot of the current page with element refs (e.g., [ref=e5]) for reasoning and element targeting without screenshots.

Instructions

Capture an accessibility tree snapshot of the current page with element refs (e.g. [ref=e5]). Prefer this over screenshots for reasoning and element targeting.

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
filenameNoOptional file path to save the snapshot text to instead of returning it inline.
sessionIdNoOptional target browser session ID. If omitted, uses the currently active session (or auto-launches one).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden; it usefully discloses that output is an accessibility tree containing refs usable for targeting. It does not state that the operation is non-mutating/read-only, whether large pages are truncated, or that omitting a session auto-launches one — behavior an agent would want before calling.

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?

Two sentences, front-loaded with the action and payload, followed by selection guidance. Every clause earns its place with no redundant restatement of the name or schema.

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 simple two-optional-parameter read tool with no output schema, the description covers what it produces (tree with refs) and why to use it. The main remaining gap is that it does not describe the inline-vs-file return behavior or size limits, which matters since no output schema exists.

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 both optional parameters (filename, sessionId) are already fully documented inline, establishing the baseline of 3. The description adds no format, path, or session-selection detail beyond what the schema says.

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 verb ('Capture') and a precise resource ('accessibility tree snapshot of the current page'), and names the distinguishing content (element refs like [ref=e5]). It explicitly sets itself apart from browser_take_screenshot, so an agent can choose between them without opening a 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 routing guidance: 'Prefer this over screenshots for reasoning and element targeting,' which names the alternative and the condition that selects it. It stops short of stating when a screenshot is actually the better choice (e.g. visual/layout questions), so no true exclusions are covered.

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