Skip to main content
Glama

browser_snapshot

Captures a page accessibility-tree snapshot with element refs and optional DOM/AX field facts, returning a snapshot ID for semantic diffs.

Instructions

Read AX with refs, or profile=fields for DOM/AX field facts. Returns snapshot_id. diff_since returns semantic changes as baseline line splices: start_line/delete_count, snapshot text, line_offset and complete for paged insertions. Collect all pages, concatenate each insertion by line_offset, then apply splices in descending start_line order. Still collects full AX. Observations share a 30s budget; next_cursor continues the captured view.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tab_handle": "<tab_handle>"
    },
    "name": "browser_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoDefault true; false hides prose, preserving control names and values.
queryNoCase-insensitive literal substring of names, values, AX descriptions or nearby context. fields also searches HTML labels, DOM id/name/placeholder and selected options. Zero matches is not an error.
cursorNo
profileNoDefault full; interactive keeps controls/ancestors; fields returns separate DOM/AX values in a fields array.
verboseNoInclude viewport.
max_charsNo
max_nodesNo
diff_sinceNosnapshot_id is strict. "latest" uses this claim's baseline, returning mode=full/reset_reason if unavailable or view changed. Full/interactive only; unread pages report next_cursor in diagnostics. Exclusive with cursor.
tab_handleYes
text_limitNoProse preview length, marked with …; control names/values stay complete. Default 80 for interactive, unlimited for full.
include_hiddenNofields only, default false: include native fields omitted from AX; ref may be null. Password values omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.34.0
    • addedInput schema / properties / diff_since
      Added value: +{
      +  "description": "snapshot_id is strict. \"latest\" uses this claim's baseline, returning mode=full/reset_reason if unavailable or view changed. Full/interactive only; unread pages report next_cursor in diagnostics. Exclusive with cursor.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Case-insensitive literal substring of names, values or nearby context. fields also searches HTML labels, DOM id/name/placeholder and selected options. Zero matches is not an error."New value: +"Case-insensitive literal substring of names, values, AX descriptions or nearby context. fields also searches HTML labels, DOM id/name/placeholder and selected options. Zero matches is not an error."
    • changedInput schema / properties / verbose / description
      Previous value: -"Include viewport and snapshot_id."New value: +"Include viewport."
  2. Changed2 schema fields changedv0.24.2
    • changedInput schema / properties / include_hidden / description
      Previous value: -"fields only, default false: also include native fields omitted from AX, such as hidden inputs. These may have ref=null. Password values are omitted."New value: +"fields only, default false: include native fields omitted from AX; ref may be null. Password values omitted."
    • changedInput schema / properties / profile / description
      Previous value: -"Default full; interactive keeps controls and ancestors; fields returns a fields array instead of AX text."New value: +"Default full; interactive keeps controls/ancestors; fields returns separate DOM/AX values in a fields array."
  3. First observedv0.24.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description supplies substantial operational behavior: snapshot_id output, the diff splice representation and application order, continued full-AX collection, a shared 30-second observation budget, and cursor-based continuation. These details disclose output, cost, timing, and pagination behavior well beyond a generic claim that the tool reads a snapshot.

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?

The purpose is front-loaded and nearly every sentence carries useful operational information, particularly the mandatory splice-processing sequence. However, the telegraphic compression and context-free sentence "Still collects full AX" make the description harder to parse than a slightly more structured presentation.

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?

Together with the schema, it covers modes, filtering, truncation, diff strictness and exclusivity, paging, and the unusual diff-application workflow well enough for correct invocation despite the absence of an output schema. Remaining gaps include how to obtain or interpret tab_handle, the normal snapshot response shape, and how max_chars and max_nodes interact with pagination and the observation budget.

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?

At 64% schema coverage, the description meaningfully supplements profile and diff_since and indirectly clarifies the cursor workflow through next_cursor. It does not close every gap: the required tab_handle remains unexplained, and max_chars and max_nodes receive no additional semantics or interaction guidance.

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?

The opening identifies a specific operation and resource: reading an accessibility (AX) snapshot with refs, with a fields profile for DOM/AX field facts. Differentiation from the sibling browser read tools is implicit rather than explicit, and the unexplained AX abbreviation slightly reduces immediate clarity.

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?

It gives concrete selection cues: use profile=fields for field facts, diff_since for semantic changes, and next_cursor to continue the captured view. There is no when-not guidance or named alternative, and choosing between full and interactive is left to the schema.

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