Skip to main content
Glama

snapshot

Capture a compact text outline of a browser page with interactive element references across iframes and shadow DOM; filter by text, viewport, or mode to inspect content without screenshots.

Instructions

Compact page outline: text plus [ref] lines for interactive elements, across iframes and shadow DOM. Cheaper than a screenshot.

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": "snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoWhile a modal dialog is open, also show the page behind it
maxNoChar budget, default 8000
tabNoTab id. Default: your own target tab (each agent session gets its own)
modeNointeractive = refs only; text = readable page text
hrefsNoShow link URLs (off by default to save tokens)
queryNoOnly lines containing all these words; "a|b" = either. Plain words, not a regex
browserNochrome, edge, ... (only when several browsers are connected)
viewportNoOnly what is on screen

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/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 does disclose useful traits beyond structure: it traverses iframes and shadow DOM, and it is token-cheap relative to screenshots. It does not say the operation is read-only, how the outline is bounded by the max budget, or what the refs can be fed into.

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 short sentences, front-loaded with the output shape and followed by the cost rationale. No filler or redundant restatement of the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an eight-parameter read tool with no output schema and no annotations, the description is thin: it does not describe the return structure beyond 'text plus [ref] lines', nor how truncation at the char budget appears. It is adequate to pick the tool but leaves the agent guessing about the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with per-parameter descriptions including the mode enum and default char budget, so the schema does the heavy lifting. The description still adds a little by explaining what '[ref]' lines mean (interactive elements), which clarifies the interactive mode's output.

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 output: a 'compact page outline' of text plus '[ref]' lines for interactive elements, scoped across iframes and shadow DOM. An agent can tell this is a page-inspection tool rather than an action tool, though it never names a specific sibling it replaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Cheaper than a screenshot' implies the cost-based tradeoff and hints at screenshot as the alternative, but there is no explicit when-to-use/when-not rule (e.g. use for reading structure, use screenshot for visual layout). Guidance is implied rather than stated.

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