Skip to main content
Glama

Browser Snapshot

browser_snapshot

Capture an accessibility tree snapshot of the current page as YAML to inspect page structure when other tools fail; scope it with an optional CSS selector.

Instructions

Get accessibility tree snapshot of the current page. Returns a YAML representation of the ARIA tree - useful for understanding page structure when other tools fail. Args: selector = optional CSS selector to scope the snapshot.

Session parameter:

  • session=None (default): Uses primary session ("s1")

  • session="s2": Targets specific session (for parallel agents)

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
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
selectorNoOptional CSS selector to scope the snapshot.

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
successNoWhether the operation succeeded
selectorNoScoped selector if provided
snapshotNoARIA snapshot in YAML format
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the output format (YAML ARIA tree) and the session-targeting model, including the 's2' parallel-agent use case, which is genuinely useful. It omits practical behavior such as snapshot size limits/truncation, whether the page must be loaded first, or staleness of the 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?

Purpose and return format are front-loaded in the first sentence, followed by the scoping detail and session semantics. No filler; the only redundancy is the docstring-style Args line, which is minor and self-contained.

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?

An output schema exists and the description still summarizes the return shape, and the session/selector semantics are covered for a zero-required-parameter read tool. What's missing is limited to edge-case behavior, which is acceptable for this tool's complexity.

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 all three parameters are already documented, making the baseline 3. The description adds marginal value by explaining that 'session=s2' exists for parallel agents, but the duplicated 'Args: selector = optional CSS selector' line restates the schema without adding meaning.

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 accessibility tree snapshot of the current page') and clarifies the return representation (YAML ARIA tree). It implicitly separates itself from screenshot/HTML tools by framing itself as a fallback for understanding page structure, though it never names a sibling explicitly.

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?

Usage is only implied by 'useful for understanding page structure when other tools fail' — a useful but vague condition that leaves the agent to guess which 'other tools' and what 'fail' means. No explicit when-not-to-use case or named alternative is given.

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