Skip to main content
Glama

页面快照

browser_snapshot
Read-onlyIdempotent

Captures a structured accessibility snapshot of the active browser tab as a YAML-style tree with stable element refs, so agents can inspect pages and target elements for click or type actions.

Instructions

Capture a structured accessibility snapshot of the active tab as a YAML-style tree. Interactive elements carry [ref=eN] ids; pass a ref to browser_click / browser_type / browser_select_option to act on them. Snapshots are incremental: unchanged page returns a one-line reply, small changes return only the changed region, and refs stay stable across snapshots. Pass full:true to force a complete tree (automatic after navigation or large changes). For very long pages, pass maxNodes to page through the tree: the response reports totalLines and nextCursor; pass cursor on the next call. Paging still assigns refs for the whole tree, so refs from any page remain usable.

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
fullNoForce a full snapshot instead of incremental (default false)
tabIdNoTab id (default: active tab)
cursorNoLine offset for a paged snapshot, from the previous response nextCursor (default 0)
maxNodesNoPage size: max lines to return per call (1–2000). Omit for the normal full/incremental snapshot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial behavior the agent could not otherwise know: incremental snapshots, a one-line reply for unchanged pages, partial-region replies, ref stability across snapshots, automatic full snapshots after navigation or large changes, and that paging still assigns refs for the whole tree. That last point materially affects correctness of later click/type calls.

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-loads the core purpose, then layers refs, incremental behavior, and paging in a logical order with no filler. It is dense — the paging explanation spans two sentences — but every sentence carries operational information.

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?

With no output schema, the description still explains the return shape (YAML tree, one-line unchanged reply, totalLines/nextCursor). The main remaining gap is error behavior, such as what happens when a ref becomes stale after a large change, which matters for the click/type workflow it advertises.

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 goes beyond it by explaining that full is applied automatically after navigation or large changes, that maxNodes pages the tree and pairs with cursor, and that the response reports totalLines and nextCursor. It adds real semantics rather than restating the schema fields.

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 and resource: 'Capture a structured accessibility snapshot of the active tab as a YAML-style tree'. It also defines the artifact concretely (YAML tree with [ref=eN] ids), which lets an agent distinguish this read/snapshot tool from action siblings like browser_click without opening any 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 operational guidance: pass a ref to browser_click / browser_type / browser_select_option, use full:true to force a complete tree, and use maxNodes+cursor for long pages. It does not state when to prefer this over sibling inspection tools (e.g. browser_page_state, browser_find), so it stops short of full when/when-not coverage.

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