Skip to main content
Glama

get_page_snapshot

Capture the current page DOM as a markdown snapshot with interactive element ref IDs, so agents can inspect state before clicking, typing, or finding elements.

Instructions

Get a markdown snapshot of the current page DOM. Returns interactive elements with ref IDs for targeting. When to use: BEFORE any click/type/interaction to see current page state. Call this at the start of each new page or when you need to find elements. Related: read_page (plain text content), get_text (single element text). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional. Tab id this read targets. Omit when the calling agent owns exactly one tab; required to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses multi-agent tab scoping, the cross-agent rejection error (TAB_NOT_OWNED), and a configurable cap (default 8, range 1-64). It stops short of describing output shape/pagination or auth nuances, but the error and limit disclosure is genuinely useful context not present anywhere else.

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?

Front-loads the purpose then layers usage, related tools, and multi-agent constraints in a scannable order. It is dense and repeats the schema's tab_id guidance, which is mild redundancy, but every sentence carries operational value.

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?

There is no output schema, and the description compensates by stating what is returned (markdown DOM snapshot with interactable elements and ref IDs). Combined with usage triggers and the tab-ownership error path, an agent has everything needed to call this correctly for a single-parameter read tool.

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% and the tab_id schema text already explains the single-tab vs multi-tab rule in detail. The description restates the same rule ('pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise'), adding confirmation but no new syntax or format detail, so the baseline 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 (Get) and resource (markdown snapshot of the current page DOM), then specifies what the return contains (interactive elements with ref IDs for targeting). It explicitly distinguishes itself from siblings read_page and get_text by their differing outputs, so an agent can choose without opening any schema.

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?

Gives explicit trigger conditions: 'BEFORE any click/type/interaction' and 'call this at the start of each new page or when you need to find elements.' It also names the alternatives (read_page for plain text, get_text for single element) so the routing decision is unambiguous.

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