Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_snapshot

Read-only

Captures an accessibility snapshot of the current page so agents can inspect page structure and elements without relying on screenshots.

Instructions

Capture accessibility snapshot of the current page, this is better than screenshot

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": {
      "session": "<session>"
    },
    "name": "browser_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
boxesNoInclude each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)
colorNoOptional Chrome tab group color override for a newly created session.
depthNoLimit the depth of the snapshot tree
targetNoExact target element reference from the page snapshot, or a unique element selector
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.
filenameNoSave snapshot to a file instead of returning it in the response. Relative file names are resolved against the workspace root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds that output is an accessibility tree rather than an image, which is meaningful context, but it does not disclose the snapshot's structure, size limits, or that a new session/tab may be created (implied by the 'color' tab-group parameter).

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?

A single short sentence that front-loads the core action. The trailing comparative clause is slightly informal and unsubstantiated, but it is brief and does add routing value rather than waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter tool with no output schema, the description never explains the shape of the returned accessibility snapshot, so an agent cannot anticipate what the output looks like. The schema covers parameters well, but the missing output description leaves a gap for a tool whose whole purpose is producing structured output.

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 seven parameters including 'depth', 'target', 'boxes', and 'filename' are already documented in the schema. The description contributes nothing beyond the schema for parameters, which is acceptable at baseline 3 when the schema does the heavy lifting.

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?

Names a specific verb and resource ('Capture accessibility snapshot of the current page') and implicitly contrasts it with screenshot capture, so the agent can tell it apart from browser_take_screenshot. It stops short of naming the sibling tool explicitly, leaving the comparison somewhat informal.

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?

The phrase 'this is better than screenshot' implies a preference for this tool over pixel capture, which is a useful nudge. However, there is no explicit when-to-use/when-not guidance, no mention of when a screenshot would actually be preferable, and no note about required session setup or prerequisites.

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