Skip to main content
Glama

Capture Window Frame

capture_window_frame
Read-onlyIdempotent

Capture a window's frame into memory as image content for GUI inspection or testing on Wayland; optionally save it as a PNG artifact.

Instructions

Captures window frame as in-memory ImageContent (saves PNG when save_artifact=True).

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_window_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
crop_boxNo
save_artifactNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new context: the result is returned in memory and only persisted as a PNG when save_artifact=True. However, it omits which window is captured (foreground? requires pid?), whether capture can fail when a window is minimized/occluded, and whether the artifact write conflicts with the readOnly hint. Note the mild tension: a file write under readOnlyHint=true is worth calling out, but artifacts are conventionally exempt, so this is not a contradiction.

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?

A single front-loaded sentence with the resource first and the conditional side effect parenthesized. No filler, nothing to cut.

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

Completeness2/5

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

With no output schema and 0% schema description coverage, the description carries the full burden, and it only partially delivers: return type is covered but resolution/format of the image, default capture target, and the semantics of pid and crop_box are missing. For a 3-parameter capture tool this leaves an agent guessing at invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and only one of three parameters (save_artifact) is explained. The two parameters that actually determine the capture — pid (what a null default means) and crop_box (expected order/format, e.g. [x, y, w, h]) — are left entirely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb + resource ("Captures window frame") plus the return medium (in-memory ImageContent). An agent knows exactly what it gets. It does not distinguish itself from the sibling window_control, which an adjacent tool for window interaction would make useful.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance and no alternatives named; the description never says when to capture versus inspecting the UI tree or using window_control. The only conditional given is the save_artifact flag, which is a behavior switch rather than usage guidance.

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