Skip to main content
Glama

capture_screenshot

Read-only

Captures a browser tab’s viewport, full scrollable page, or selected element by CSS selector, so you can visually inspect or document web content.

Instructions

Screenshot of the tab's viewport, of the whole page with full_page, or of one element with selector (at most 16384 CSS pixels per side; a larger capture gets a note). To find elements to act on, prefer 'snapshot'.

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

Input Schema

NameRequiredDescriptionDefault
formatNo'png' (default), 'jpeg' (or 'jpg') or 'webp'.
tab_idNoDefault: the active tab.
qualityNo0 to 100, for jpeg and webp. Default: 100.
selectorNoOnly this element's box: CSS selector, 'host >>> inner' (into an open shadow root or same-origin iframe) or snapshot ref (e12).
full_pageNoCapture the whole scrollable page. Default: false.
instance_idNoDefault: 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-rc.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. Beyond that, the description discloses a concrete behavioral limit — at most 16384 CSS pixels per side, with a note returned for larger captures — which is valuable for predicting partial results. It does not say what form the image data is returned in, which is the main remaining behavioral gap.

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 redundancy. The capture modes and their parameters are front-loaded, followed by the size constraint and then the redirect to 'snapshot'. Every clause adds information.

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 read-only 6-parameter capture tool with full schema coverage and annotations declaring read-only behavior, the description covers purpose, modes, limits and the main alternative. Only the return payload shape (raw image vs. path vs. inline data) is left unstated, and there is no output schema to cover it.

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 description coverage is 100%, so format, quality, tab_id, selector, full_page and instance_id are all already documented. The description confirms the full_page and selector semantics but adds only the cross-cutting pixel-dimension constraint, not parameter-specific meaning beyond the schema. Baseline 3 applies when the schema carries the semantics.

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 opens with a precise verb-and-resource statement ('Screenshot of the tab's viewport') and enumerates the three capture modes (viewport, full_page, selector), so an agent understands exactly what the tool returns. It also names the sibling 'snapshot' as a different tool for a different job, making it distinguishable without opening the schema.

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?

It gives an explicit exclusion: 'To find elements to act on, prefer snapshot' — telling the agent when NOT to use this tool. The three capture modes are mapped to their parameters, which implies usage, but there is no guidance on when a screenshot is the appropriate action versus other observation tools like get_css_styles or inspect_dom.

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