Skip to main content
Glama

ui_take_screenshot

ui_take_screenshot

Capture the current viewport, a selected element, or the full scrollable page as a PNG saved to reports output; optionally return the image inline for inspection.

Instructions

Capture the current viewport and save it as a PNG to the reports output. With selector, capture just that element; with fullPage, the whole scrollable page (cut at 16000 device pixels tall and 3840px wide). With inline: true the image itself is also returned (scaled to fit 1280x8000px; the file on disk stays full size) so you can look at it. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.

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

Input Schema

NameRequiredDescriptionDefault
inlineNoAlso return the PNG as image content, scaled down
fullPageNoCapture the whole scrollable page, not just the viewport
selectorNoCSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged; captures only that element. Not with fullPage
session_idNoWhich open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the side effect (a PNG written to reports output), hard capture limits (16000 device px tall, 3840px wide), and that the inline image is downscaled to 1280x8000 while the on-disk file stays full size. These are exactly the behavioral traits an agent needs before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then conditional behaviors in parallel 'With X...' clauses. It is a dense single paragraph with no filler, though the selector caution at the end could be broken out for faster scanning.

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 four-parameter, non-mutating-in-the-DB-sense tool with no output schema and no annotations, the description covers capture modes, size limits, and return behavior adequately. The only gap is that the exact destination path of the saved PNG is not stated.

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 100%, so a 3 is the baseline, but the description adds real meaning beyond the schema: the truncation dimensions for fullPage, the scaling behavior for inline, and the stability caveat for positional selectors. It does not elaborate on session_id semantics, though the schema already documents that.

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 and resource ('Capture the current viewport and save it as a PNG') and immediately scopes the variants (selector for element, fullPage for scrollable page). It is clearly distinguishable from siblings like ui_get_page_state, which the description deliberately references as a source of selectors.

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 concrete guidance on which parameter selects which capture mode and a specific operational rule: re-call ui_get_page_state after page changes before reusing 'nth=' selectors. It does not explicitly say when to screenshot versus inspect page state, so usage is strongly implied rather than exhaustively framed.

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