Skip to main content
Glama

browser_snapshot

Captures an accessibility snapshot of the current page and returns a text tree with [ref] labels for interactive elements. Use these refs to target click, type, and other browser actions.

Instructions

Get an accessibility snapshot of the current page.

Returns a text tree of page elements. Interactive elements are labeled with [ref] numbers that can be used in other browser tools (click, type, etc.). Always call this before interacting with elements.

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

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the load and does disclose the return shape (a text tree) and a key behavioral contract: interactive elements carry [ref] numbers consumed by click/type. It omits whether refs are invalidated after navigation or how large the snapshot can get.

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?

Three short sentences, purpose first, then return format, then the prerequisite rule—well front-loaded. Slight redundancy between 'accessibility snapshot' and 'text tree of page elements', but nothing extraneous.

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 zero-parameter tool with an output schema, the description covers purpose, return form, and the ordering constraint that governs the whole browser workflow. Missing only edge behavior such as ref staleness after page changes.

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?

The tool takes zero parameters, so there is no parameter meaning to add; baseline 4 applies. The description introduces the [ref] identifiers, which are effectively the output-side handles the agent must carry forward.

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?

States a specific verb and resource: 'Get an accessibility snapshot of the current page', clarified further as a 'text tree of page elements'. That is clearly distinct from raw-HTML or markdown fetches, though it never names the sibling tools that return those formats.

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 an explicit prerequisite rule: 'Always call this before interacting with elements', which tells the agent exactly when this tool must run. It stops short of naming when-not-to-use cases (e.g., when the raw HTML or markdown is what's wanted).

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