Skip to main content
Glama

snapshot

Lists visible interactive elements with stable refs across DOM, Shadow DOM, and same-origin iframes, so agents can target page controls. Filter by selector, viewport, or text to narrow results.

Instructions

List visible interactive elements with refs (e0, e1, ...) across DOM, Shadow DOM, and same-origin iframes. Use filter/viewport_only to narrow; include_hrefs=True to show link URLs.

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
tabNo
filterNo
selectorNobody
max_lengthNo
max_elementsNo
include_hrefsNo
viewport_onlyNo
include_shadowNo
include_iframesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses scope limits (same-origin iframes only, implying cross-origin content is excluded) and the ref format, but leaves implicit that the call is read-only and says nothing about truncation defaults (max_length=8000, max_elements=80) that will silently cut results.

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 sentences, zero filler, with the core capability front-loaded and the tuning knobs trailing. Nothing needs trimming.

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?

An output schema exists, so return-format explanation is correctly omitted. But for a 9-parameter tool with no annotations and no parameter documentation, the definition should say more about selector scoping and the max_elements/max_length truncation behavior an agent must account for.

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 coverage is 0%, so the description must compensate, and it only explains three of nine parameters (filter, viewport_only, include_hrefs). include_shadow and include_iframes are at least implied by 'Shadow DOM, and same-origin iframes', but tab, selector, max_length, and max_elements get no meaning added beyond their terse names.

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 specific verb+resource: 'List visible interactive elements with refs (e0, e1, ...)' and scopes it to DOM, Shadow DOM, and same-origin iframes. The ref-output detail makes it distinguishable in practice from get_content/extract, though no sibling is named explicitly.

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

Usage Guidelines2/5

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

The only usage steering is parameter-level ('Use filter/viewport_only to narrow; include_hrefs=True to show link URLs'); there is no statement of when to pick snapshot over state, get_content, extract, or evaluate_js. It tells the agent how to tune the call, not when to make it.

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