Skip to main content
Glama

snapshot

Read-only

Outline a page's interactive elements with roles, names, states, and refs so you can select and act on them; use refs with input tools until navigation.

Instructions

Outlines the page to act on it: one line per element with a role (button, link, textbox, heading...), name, states, value and a ref ([ref=e12]), indented under its parent; an invalid field shows [invalid] [error='why'], a its first 25 options (pick one with fill_input); through open shadow roots and iframes (another origin's frame is [frame=f2], refs f2e5; selector 'f2' outlines it alone); hidden elements left out, passwords never shown; at most 50000 characters (find_in_snapshot searches it whole). Refs work as the selector of the input tools until the page navigates. Same on Chrome and Firefox.

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
depthNoMost nesting levels (0 = the top level only). Default: no limit.
tab_idNoDefault: the active tab.
selectorNoOutline only this element (CSS, 'host >>> inner' or a ref). Default: the whole page.
instance_idNoDefault: 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-rc.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, and the description adds substantial behavior beyond that: hidden elements are omitted, passwords are never shown, output is capped at 50000 characters, refs go stale after navigation, and invalid fields are flagged with error text. These are exactly the runtime traits an agent needs to interpret results.

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 purpose and packed with useful detail at high density. The single semicolon-chained sentence is run-on and hurts scanability slightly, but almost every clause carries information an agent needs.

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 specifying the line format, state markers, option truncation, frame prefixes and size limit — everything needed to parse the result. For a read-only outline tool with full schema coverage, nothing material is missing.

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%, so the baseline is 3, but the description adds real meaning: it explains the frame-ref naming scheme ('f2e5'), that selector 'f2' outlines a frame alone, and that refs are valid selectors. It does not elaborate on depth or instance_id, so it adds value without fully covering all four parameters.

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 ('Outlines the page to act on it') and immediately defines the output shape — one line per element with role, name, states, value and a ref. This is clearly distinguishable from siblings such as inspect_dom or capture_screenshot because the description is about a ref-annotated outline, not raw DOM or an image.

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?

Usage is strongly implied through the workflow: refs become the selector for the input tools 'until the page navigates', and select options are 'pick one with fill_input'. It names a sibling and its role but never explicitly says when to prefer this over inspect_dom or capture_screenshot, so it stops short of full guidance.

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