Skip to main content
Glama
Browser Session MCP

Browser Session MCP

take_snapshot

Read-only

Capture the active tab's accessibility tree as indented text to find links, buttons, headings, form fields, and labels for clicking or typing without changing the page.

Instructions

Return the accessibility tree of the session's active tab as indented text: each node's role and name (links, buttons, headings, form fields and their labels, and current values), nested by structure. A control the page gives no name shows what its icon is, as button (icon "trash"), read from the icon's markup. Use it to find what's on the page and what to click or type into, far more cheaply than take_screenshot; use take_screenshot when visual layout matters, and evaluate for data not shown as text. It reads the page without changing it and returns the whole tree, so a large page gives long output.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "take_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
  2. First observedv0.1.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is known. The description still adds real value beyond them: the output is the whole tree with no filtering, so a large page yields long output, and unnamed controls surface icon markup. It stops short of noting load-state assumptions (e.g. whether the page must be settled before snapshotting) or any truncation behavior on very large pages.

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 with a distinct job: what it returns, how unnamed controls are rendered, when to use it versus siblings, and the read-only/large-output caveat. The core capability is front-loaded and there is no redundant restatement of the name or title.

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 carries the burden of describing return values and does so concretely (indented text, node roles and names, nesting, icon fallback, full tree). The lone parameter is fully covered by the schema. Only the absence of guidance on page-readiness or output size limits keeps it from complete.

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?

There is a single parameter at 100% schema coverage, and the schema already explains sessionId came from open_browser_session and errors when no matching session is open. The description only indirectly reinforces this by referring to 'the session's active tab,' adding little beyond the schema. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Return the accessibility tree of the session's active tab as indented text,' then enumerates what the tree contains (roles, names, labels, current values). It is immediately distinguishable from take_screenshot and evaluate, both of which it names.

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?

It gives an explicit primary use case ('find what's on the page and what to click or type into'), an explicit alternative with its condition ('use take_screenshot when visual layout matters'), and a third for non-textual data ('evaluate for data not shown as text'). This is the when/when-not/alternatives pattern at full strength.

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