Skip to main content
Glama

take_snapshot

Capture a text snapshot of a page's accessibility tree, listing elements with unique IDs to inspect page state. Use it to identify the element selected in DevTools and guide further actions.

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.4/5.0
Behavior4/5

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

The description adds behavioral context beyond the annotations: it explains the snapshot is based on the a11y tree, lists elements with uids, and indicates the selected element in DevTools. The annotation readOnlyHint=false is consistent with the description (it's a read operation but not marked read-only, likely because it may have side effects like saving to a file). The description doesn't contradict the annotation. It could mention side effects of saving to filePath, but the schema already covers that parameter.

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?

The description is three sentences, each earning its place: what it does, when to use it, and what it indicates. It's front-loaded with the core function and includes actionable guidance without fluff.

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?

The description is complete for a snapshot tool: it explains the output format (text snapshot, a11y tree, uids), usage preference over screenshots, and the DevTools selection indicator. It doesn't describe the return format in detail, but there's no output schema and the description gives enough for an agent to understand what to expect. Minor gap: it doesn't explain what 'verbose' does beyond the schema, but the schema already covers that.

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 the schema already documents all three parameters (pageId, verbose, filePath). The description adds context about the snapshot content (a11y tree, uids) but doesn't add parameter-specific meaning beyond what the schema provides. Baseline 3 is appropriate since the schema does the heavy lifting.

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?

The description clearly states the tool's function: taking a text snapshot of the target page based on the a11y tree, listing elements with unique identifiers. It also explicitly differentiates from the sibling tool take_screenshot by saying 'Prefer taking a snapshot over taking a screenshot.' This makes the purpose unambiguous and distinguishes it from similar tools.

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?

The description provides explicit usage guidance: 'Always use the latest snapshot' and 'Prefer taking a snapshot over taking a screenshot.' This tells the agent when to use this tool and implies when not to use it (when a screenshot is needed). It also mentions the snapshot indicates the element selected in the DevTools Elements panel, which is useful context for interpreting results.

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