Skip to main content
Glama

capture_page

Snapshot a page's visible links, buttons, inputs, and headings with stable refs (e1, e2) and selectors for click, type, select, or scroll actions instead of guessing selectors.

Instructions

Snapshot the page's visible interactive elements and headings (links, buttons, inputs, selects, textareas, ARIA roles, h1-h4) with stable refs e1, e2, ... and a reusable selector for each. Pass a ref to click, type, get_text, select_option, interact, or scroll instead of guessing a selector. Refs belong to this snapshot, so capture again after navigation or major page changes. Prefer this over screenshots or get_page_source to understand what is on the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxElementsNoMaximum elements to return, 10-500 (default 200). Lower it on very large pages to keep the result small.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / maxElements / description
      Added value: +"Maximum elements to return, 10-500 (default 200). Lower it on very large pages to keep the result small."
  2. Addedv0.2.0

TDQS

A4.4/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 and it delivers the single most critical behavioral trait: refs are scoped to this snapshot and go stale after navigation or major page changes. It doesn't cover permissions, rate limits, or result-shape details like whether truncation occurs when maxElements is hit, so it falls short of a 5.

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?

Densely front-loaded: what is captured, the ref convention, how to consume refs, the staleness caveat, and the routing away from screenshot/get_page_source. Every sentence carries actionable information with no filler.

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?

For a no-output-schema tool the description does explain the returned artifacts (stable refs and reusable selectors) plus the invalidation rule, which is enough for correct invocation. Minor gap: no note on truncation behavior on large pages or what happens if a page has no interactive elements.

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?

There is only one parameter (maxElements) and the schema already documents it fully at 100% coverage, including default 200 and the 10-500 range with tuning guidance. The description adds nothing about it, which is acceptable given the schema does the work—baseline 3.

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 (snapshot) and resource (the page's visible interactive elements and headings), then enumerates exactly what is captured (links, buttons, inputs, selects, textareas, ARIA roles, h1-h4) and what is produced (e1, e2 refs plus selectors). It also differentiates itself from siblings like take_screenshot and get_page_source.

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?

Explicitly tells the agent to pass a ref to click, type, get_text, select_option, interact, or scroll instead of guessing selectors, mandates re-capturing after navigation or major page changes, and names screenshots/get_page_source as inferior alternatives for understanding page content.

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