Skip to main content
Glama

Snapshot page

browser_snapshot
Read-only

Inspect a page's accessibility tree as compact YAML with element refs for interaction. Filter by ref, CSS, or role, limit depth, or page with offset.

Instructions

Returns the accessibility tree of the page as compact YAML, with a [ref=eN] handle on every element. This is the primary way to see the page — use these refs to click and type. Far cheaper than HTML or screenshots. Scope it with ref/css/role, cap it with depth, or page through it with offset when a page is large.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoCSS selector, as an alternative to ref.
refNoElement ref from the most recent snapshot, e.g. "e12". Preferred — refs are exact. Only valid for the page state that produced them.
nameNoAccessible name to match alongside role.
roleNoARIA role, e.g. "button". Combine with name for an accessible-name match.
boxesNoInclude [box=x,y,w,h] viewport coordinates.
depthNoLimit tree depth. Useful for a quick overview of a large page.
indexNoWhich match to use when the selector is ambiguous (0-based, default 0).
offsetNoStart offset, for paging.
maxCharsNoCharacter budget for this call.
sessionIdYesSession id returned by browser_start.
interactiveOnlyNoReturn only actionable elements (buttons, links, inputs, ...).
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering the read-only nature. The description adds value beyond that by revealing the output structure (YAML with refs), the performance characteristics (cheaper than HTML/screenshots), and the fact that refs are tied to a particular page state (mentioned in schema, but reinforced). It doesn't describe side effects, but none are expected for a read-only snapshot.

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?

Four sentences, each earning its place: the first defines the output, the second establishes the primary use case and inter-tool relationship, the third justifies cost-effectiveness, and the fourth explains scoping options. It is front-loaded with the core purpose and avoids redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter tool with no output schema, this description is remarkably complete. It covers the primary use case, how to control scope (ref/css/role), depth, pagination, and cost trade-offs. It doesn't explain every parameter, but the schema covers those in detail, and the description captures the key decision points an agent needs to call it correctly.

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?

Schema coverage is 100%, so the baseline is 3. The description adds guidance on parameter usage: refs are 'preferred' because they are 'exact', css is an 'alternative', and role combines with name. It also introduces the concepts of scoping, capping, and paging, which map to the depth and offset parameters, providing extra context beyond their schema descriptions.

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?

The description states a specific verb ('Returns'), a resource ('accessibility tree of the page'), and the output format (compact YAML with refs). It clearly distinguishes this from sibling tools like browser_screenshot by explicitly calling out that it's 'Far cheaper than HTML or screenshots' and frames it as 'the primary way to see the page'.

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

Usage Guidelines5/5

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

The description explicitly says 'use these refs to click and type', which ties to sibling interaction tools and indicates when to call this first. It also mentions to 'Scope it with ref/css/role, cap it with depth, or page through it with offset when a page is large', providing concrete guidance for large pages. It implies when not to use it (e.g., if you need visual info, screenshots exist) by contrasting cost and purpose.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hofmeister/web-ui-tester'

If you have feedback or need assistance with the MCP directory API, please join our Discord server