Skip to main content
Glama

page.screenshot

Read-only

Capture the rendered page as an image for visual inspection, selecting viewport, full-page, element, or sheet layout that keeps long pages readable. Stored artifacts support later review.

Instructions

See the rendered page. Returns the image for visual inspection plus a stored artifact. mode: viewport, full_page, element (with a locator), or sheet: the whole page cut into side-by-side columns that fit one screen, so a long page stays readable. Prefer sheet for reviewing a whole page; add width:320 for a phone or width:1280 for a desktop without touching the viewport.

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": "page.screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
modeNo
textNoVisible text of the element.
labelNoTag for this capture, e.g. "onboarding-repro". Filter later with artifact.list(label:).
widthNomode:sheet. Lay the page out at this CSS width for the capture, then put the viewport back. Under 600 emulates a phone.
xpathNoXPath expression.
aspectNomode:sheet. Shape to fit, like "16:10" or "4:3". Default 16:10.
formatNo
heightNomode:sheet. Viewport height to go with width. Default 800 for a phone, 900 otherwise.
settleNoWait for running CSS animations and transitions to finish first, so entrance animations are not captured mid-flight.
columnsNomode:sheet. Columns to cut the page into, up to 12. Default: whatever fits aspect.
qualityNo1-100, for jpeg/webp.
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
highlightNoCSS selector to box in the image. One-shot: the overlay is cleared after capture, unlike page.highlight.
max_widthNoDownscale the capture to at most this many CSS pixels wide. Cuts payload on wide or full-page shots. With mode:sheet it caps the whole sheet, default 2000.
save_pathNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
timeout_msNoGive up after this long. Default 15000; a hung capture reports what the target was doing rather than stalling.
return_imageNoDefault true. Set false to store only.
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.
settle_timeout_msNoCap on the settle wait. Default 2000.
trigger_lazy_contentNoScroll the full page once before a full_page capture, so IntersectionObserver-driven content has rendered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Well beyond the readOnly/openWorld annotations it discloses that the image is paired with a stored artifact and can be suppressed via return_image:false, that highlight is one-shot (overlay cleared) unlike page.highlight, that sheet mode temporarily relayouts and then 'puts the viewport back', and that a hung capture reports what the target was doing. The annotations already cover the safety profile, and the description adds real operational context, so this sits comfortably above baseline.

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?

Three tight sentences, front-loaded with what is returned and the mode vocabulary, then a one-line recommendation. No filler and no repetition of schema text.

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 25-parameter tool with no output schema, the description covers the mode taxonomy, return behavior, artifact storage, and the viewport-restore side effect. Some secondary knobs (quality, format, frame_id, timeout_ms) are left entirely to their schema descriptions, which is acceptable given high coverage.

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 88%, so the baseline is 3, but the description supplies meaning the schema lacks: it explains the mode enum values (element needs a locator, sheet cuts into columns) and gives concrete width values for phone/desktop emulation. That is genuine added semantics for the two most decision-relevant 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 concrete verb+resource ('See the rendered page... Returns the image') and enumerates the four modes (viewport, full_page, element, sheet) with what each produces. It also differentiates from siblings by naming page.snapshot (for refs) and contrasting the highlight overlay with page.highlight.

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?

Gives explicit selection advice: 'Prefer sheet for reviewing a whole page' and 'add width:320 for a phone or width:1280 for a desktop without touching the viewport.' It tells the agent which mode to reach for in the common case, though it never states when a screenshot is the wrong tool versus e.g. page.snapshot or page.extract_text.

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

Deploy Server

Other Tools