Skip to main content
Glama

Snapshot

browser_snapshot

Captures a structured accessibility snapshot of the current browser page to locate elements with refs for reliable clicking or typing instead of using coordinates.

Instructions

取当前页面的结构化快照(ego 返回带 ref 的无障碍树;edge 返回同形态快照)。这是点击/输入前的定位依据,优先用它而不是坐标。

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
engineNo浏览器引擎:ego(默认,真实浏览器 + 登录态)/ edge(Playwright/Edge,需另装 playwright)ego

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the output form (accessibility tree with element refs) and the engine distinction, but says nothing about size/latency of large snapshots, whether the page is mutated (implicitly not, but unstated), or any failure modes when the engine is unavailable.

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 compact sentences: the output shape comes first, then the usage directive, with zero filler. Nothing is repeated unnecessarily and the actionable guidance is front-loaded.

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?

For a one-optional-parameter, read-only tool with no output schema, the description supplies the essential missing piece: what the returned snapshot looks like and how refs enable subsequent click/type calls. It could be fully complete with a note on snapshot size or engine prerequisites, but it is sufficient to call 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 coverage is 100% and the single 'engine' parameter already carries an enum with per-value descriptions, so the schema does the heavy lifting. The description echoes the ego/edge distinction (ref-bearing tree vs same-shape snapshot), adding only marginal meaning beyond the schema, which matches the baseline 3.

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?

States a concrete verb and resource ('取当前页面的结构化快照') and clarifies what the snapshot is for ('点击/输入前的定位依据'). The parenthetical noting engine-specific output shape (ego ref-bearing accessibility tree vs edge same-shape) further sharpens it, though it never names a specific sibling tool it replaces (e.g., browser_screenshot) and instead contrasts only with '坐标' generically.

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 a clear when-to-use (before click/type) and an explicit preference over coordinate-based alternatives. It stops short of stating when *not* to use it or naming other siblings to pick instead, which keeps it out of 5 territory.

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