Skip to main content
Glama
Pagewright (browser-mcp)

Pagewright (browser-mcp)

by zamansheikh

browser_snapshot

Read-only

Read a page as a compact accessibility tree of headings, text, and interactive elements with refs to click, type, or inspect, so agents can understand pages and find elements without screenshots.

Instructions

Read the page as a compact accessibility-style tree: headings, text, and every interactive element with a [ref=eN] you can pass to click/type/inspect. Use this first to understand a page and find elements — it is cheaper and more precise than a screenshot.

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
tabIdNoTab to act on. Defaults to the tab last opened/selected by an agent, else the active tab.
maxCharsNoOutput budget (default 25000).
selectorNoOnly snapshot this subtree.
interactiveOnlyNoOnly list interactive elements (smaller output).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Consistent with readOnlyHint=true, and adds real value beyond it: the output is a compact tree, interactive elements carry [ref=eN] handles that are the input to click/type/inspect, and cost/precision tradeoffs versus a screenshot are disclosed. It does not discuss truncation behavior when maxChars is hit or whether refs are stable across calls, which are the remaining behavioral unknowns.

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?

Two sentences, both load-bearing: the first defines the payload and the ref mechanism, the second gives ordering and alternative guidance. Purpose is front-loaded and there is no filler.

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

Completeness5/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 explaining what comes back, and it does: an accessibility-style tree with headings, text, and ref-tagged interactive elements. Combined with full schema coverage and a readOnly annotation, an agent has everything needed to call this correctly.

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 four parameters (tabId, maxChars, selector, interactiveOnly) are already documented in the schema. The description mentions the ref handles that other tools consume but adds no meaning to tabId, selector, or interactiveOnly beyond the schema text, so the baseline of 3 applies.

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 ('read the page as a compact accessibility-style tree') and enumerates what the output contains: headings, text, interactive elements with [ref=eN]. It also differentiates itself from browser_screenshot by calling itself 'cheaper and more precise', so an agent can pick it without opening either 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 explicit positive guidance ('Use this first to understand a page and find elements') and names one alternative it beats (screenshots). It does not address when to prefer other content readers like browser_extract or browser_get_content, or when a screenshot would actually be needed, 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.