Skip to main content
Glama

take_snapshot

Capture a target page's accessibility tree as a text snapshot, listing elements with unique IDs for reliable inspection and automation.

Instructions

Take a text snapshot of the target page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesTargets a specific page by ID.
verboseNoWhether to include all possible information available in the full a11y tree. Default is false.
filePathNoThe absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations are minimal (only readOnlyHint=false), so the description carries most of the burden, and it delivers: element list with uid, staleness semantics, and the fact that the selected DevTools element is marked. It never explains why the operation is flagged non-read-only (e.g., file emission via filePath), which is the one behavioral gap.

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?

Four short sentences, all front-loaded and functional: purpose, output shape, staleness rule, sibling preference. Slightly more than strictly necessary, but no sentence is filler.

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?

No output schema exists, and the description compensates by describing what a snapshot returns and how uids work. For a 3-parameter read-style tool this is nearly complete; only the side-effect/read-only nuance is left implicit.

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 pageId, verbose, and filePath are already fully documented in the schema. The description adds no format or usage detail beyond that, which is the correct baseline when the schema does the work.

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 ('take a text snapshot of the target page based on the a11y tree') and immediately distinguishes the output from take_screenshot by describing it as a list of page elements with unique identifiers. An agent can tell exactly what it gets without opening the 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?

Explicitly routes between siblings: 'Prefer taking a snapshot over taking a screenshot.' It also gives a lifecycle rule ('Always use the latest snapshot') that tells the agent when a prior snapshot is stale, which is a real when-to-use constraint.

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