Skip to main content
Glama

page_snapshot

Capture the current page's interactive elements and assign stable refs for automated interaction, replacing CSS selectors after DOM changes.

Instructions

Snapshot the page's interactive elements (links, buttons, inputs, selects, textareas, ...) and assign each a stable ref (e1, e2, ...) via a data-bfa-ref attribute, usable by page_click/page_type/etc instead of a CSS selector. Re-run after any action that changes the DOM — refs from a prior snapshot are invalidated. To find a specific element instead of listing all, use page_find.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNomax elements to list, in document order (default 200)
sessionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It clearly reveals the DOM side effect (adding data-bfa-ref attributes), the stability of refs, and the invalidation rule. It could add more detail on output/return behavior, but the core side effects are disclosed.

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 focused sentences: purpose, invalidation behavior, and alternative routing. It is front-loaded and every sentence earns its place with no redundant phrasing.

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 covers what the tool does, how refs are assigned and used, when to re-run, and how it differs from a sibling tool. With no output schema, an explicit description of the return format would be ideal, but the purpose and consumption model are reasonably inferable from the text.

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

Parameters2/5

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

The description adds no parameter-specific meaning. The limit parameter is only documented in the schema, and sessionId is entirely unexplained. Since schema description coverage is only 50%, the description does not compensate for the unmodeled parameter.

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 names a specific verb and resource: snapshot the page's interactive elements and assign stable refs. It clearly distinguishes itself from page_find, which is for locating a specific element rather than listing all.

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 explicitly states when to re-run the tool ('after any action that changes the DOM') and why prior refs are invalidated. It also names the alternative tool and the condition that selects it, so an agent knows which tool to use.

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