Skip to main content
Glama

take_snapshot

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.

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

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. Changed1 schema field changedv0.1.1
    • changedInput schema / additionalProperties
      Previous value: -{}New value: +false
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations only carry readOnlyHint=false, leaving most behavior to the description, which does add useful context: uid-based element identity, the staleness rule, and the DevTools Elements-panel selection marker. It does not explain what the non-read-only hint means in practice (snapshot written to disk via filePath vs attached to response), nor snapshot size/verbosity implications.

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-loaded with the core action in the first sentence, and each following sentence carries a distinct rule (uid identity, staleness, screenshot preference). Slightly encumbered by the parenthetical DevTools-panel remark, but no real waste.

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, so the description must convey the return shape, and it does describe a list of elements with uids. The remaining gap is that the effect of `verbose` on what comes back and the exact entry format are 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 all three parameters are already documented in the schema; the description only reinforces the general notion of element entries and uids. It adds no extra meaning about `verbose` or `filePath` beyond the schema text, 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?

Specific verb and resource: 'Take a text snapshot of the target page based on the a11y tree', plus it explains what a snapshot contains (page elements with unique uids). It also distinguishes itself from take_screenshot by stating the snapshot should be preferred, so an agent can separate it from that sibling.

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 clear operative guidance: 'Always use the latest snapshot' and 'Prefer taking a snapshot over taking a screenshot', which explicitly routes behavior against the nearest alternative. It stops short of stating when a snapshot is NOT appropriate (e.g., visual/CSS verification where a screenshot is required) or what to do if the page changes mid-flow.

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