Skip to main content
Glama

browser_snapshot

Captures a compact, reference-tagged text snapshot of a browser tab's interactive elements and headings so agents can inspect a page and target elements for click or fill actions.

Instructions

The page as compact text: one line per interactive element or heading, [r12] button "Save". Act on a ref with browser_click_ref / browser_fill_ref. diff=true: only lines that changed; within: a CSS selector to look inside; viewport=true: only what is on screen. tab: the handle browser_new_tab returned ("t3"). Pass it on every call: several agents can share this server, and the tab is how each one keeps to its own page.

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
tabNo
diffNo
withinNo
viewportNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose key traits: the output shape, that it is a read that produces refs, and the multi-agent sharing model where `tab` isolates each agent's page. It omits ref lifetime/stability and what happens if the tab handle is stale or omitted.

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?

Front-loaded with the output format and example, then the follow-up action, then the parameter flags. Dense and mostly waste-free, though the trailing multi-agent explanation of `tab` is slightly long-winded for the point it makes.

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?

No output schema exists, but the description effectively documents the return format and every parameter, which is what an agent needs to invoke it correctly. The remaining gap is ref lifecycle and error behavior when a tab handle is missing or invalid.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and it does: all four parameters are explained with meaning beyond their types — `tab` is the handle from browser_new_tab ("t3") and must be passed every call, `diff` limits to changed lines, `within` is a CSS selector scope, `viewport` limits to on-screen content.

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+resource: the page returned as compact text, one line per interactive element or heading, with a concrete sample line `[r12] button "Save"`. It also distinguishes itself from siblings by naming browser_click_ref / browser_fill_ref as the tools that act on the refs it emits.

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?

Clearly explains the workflow: snapshot to get refs, then act via browser_click_ref / browser_fill_ref, and pass `tab` on every call to stay on your own page. The filter flags are given usage context (diff = only changed lines, viewport = only on-screen). It stops short of routing away from near-neighbors like browser_observe / browser_read / browser_page_info, so the alternative-selection guidance is incomplete.

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