Skip to main content
Glama

capture_window

Capture a single window’s pixels even when it is covered or behind other apps. Returns the window image plus title, size, and origin coordinates so image pixels map to screen positions.

Instructions

Capture one window's pixels, including while it is covered.

Uses PrintWindow, which asks the window to render itself, so the window does
not need to be in the foreground: a window hidden behind your terminal still
captures cleanly and only that window's content is in the image.

Returns an image plus a text block with the window title, the image size,
and `origin` - the screen coordinate of image pixel (0,0), so any pixel can
be mapped back to a screen position.

max_side downscales large windows to keep image tokens sane (0 disables).
Read-only. Minimised windows and some GPU-rendered surfaces capture blank,
which is reported instead of a useless image.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "window": "<window>"
    },
    "name": "capture_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
windowYes
max_sideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4/5.0
Behavior3/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 much of it: it names the PrintWindow mechanism, declares the operation read-only, explains the downscale behavior, and reports failure modes rather than returning a useless image. Missing: what `window` identifier format is accepted, and any permission or performance caveats beyond token concerns.

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?

The first sentence is front-loaded with the core capability, and each subsequent paragraph adds new information (mechanism, return shape, downscaling, failure modes). It is longer than strictly needed for two parameters, but no sentence is pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description covers the return value in detail: an image plus a text block with window title, image size, and `origin` for mapping pixels back to screen coordinates. Combined with the stated failure modes, an agent has enough to call and interpret results.

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 coverage is 0%, so the description must compensate. It fully explains max_side (downscales large windows, 0 disables, ties it to image tokens) but only gestures at the required `window` parameter ('one window'), never saying whether it takes a title, handle, or ID.

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 one window's pixels') plus a differentiating capability ('including while it is covered'), which separates it from whole-screen siblings like capture_som and from inspection tools like get_ui_tree.

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 clear context for use (window need not be foreground) and an explicit exclusion ('Minimised windows and some GPU-rendered surfaces capture blank'), so the agent knows a failure case before calling. It does not name a sibling alternative to use instead, so it stops short of full alternatives routing.

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