Skip to main content
Glama

capture_screen

Idempotent

Saves full-screen or window screenshots to disk and returns the file path for evidence, without base64; if the named window is missing, it fails instead of silently capturing the full screen.

Instructions

截屏 / 截窗口存盘并返回路径(不回 base64)。截图是证据、不是判据;窗口找不到会如实失败,不静默改截整屏。

⚠️ 截图不是判据,只是证据。要判断「现在在哪个界面」请用 ocr。 这条规矩来自同类项目的教训(podium-mcp 源码原文: "Screenshots are NEVER an oracle.")—— 让模型看像素去下结论, 既贵(单张截图约 5 万 token)又不可靠。

不返回 base64:本项目任何返回都不超过 256 KB,而一张 2560x1440 的 PNG base64 会直接把它撑爆。图落在磁盘上,返回路径。

典型用途:验收失败时留证据(配合 ocr 的 save_on_failure)。

Args: region: "x,y,w,h" 屏幕绝对坐标;不传则截整个主屏。 window: 窗口标题子串;给了就用该窗口的矩形(优先于 region)。 找不到会如实失败,不会静默退化成截整屏。 save_path: 保存路径;不传则落临时目录(返回里给路径)。 max_side: 证据图最长边上限(等比缩小,默认 1920);0 = 不缩放。 只影响存盘的证据图,不影响坐标语义。

Returns: {ok, path, width, height, backend, region, coordinate_space, ...}

Input Schema

NameRequiredDescriptionDefault
regionNo
windowNo
max_sideNo
save_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=true. The description adds genuinely useful behavior: window lookup fails honestly rather than silently falling back to full screen, output goes to disk to stay under the 256 KB response cap, and max_side never alters coordinate semantics. That is real added context beyond the annotations, so it earns 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.

Conciseness4/5

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

It is front-loaded with the core contract and the ocr routing rule, and the Args/Returns blocks are scannable. It loses a point for redundancy: the 'screenshots are evidence, not an oracle' rule is stated twice, once in the lead and again in a full warning block with a quoted source, which is more philosophical justification than an agent needs.

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?

With no output schema, the Returns block supplies the response shape ({ok, path, width, height, backend, region, coordinate_space, ...}), and defaults plus failure behavior are covered for every parameter. Nothing an agent needs in order to call this correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does so for all four parameters: region as 'x,y,w,h' absolute screen coordinates defaulting to the main screen, window as a title substring that takes priority over region, save_path defaulting to a temp dir, and max_side defaulting to 1920 with 0 meaning no scaling. It even clarifies that max_side affects only the saved file, not coordinates.

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 opening line states a concrete verb and resource in both modes (screen / window), plus the defining output contract: saved to disk with a returned path, not base64. It also draws a sharp boundary against the sibling `ocr`, so an agent can pick between them without reading either schema.

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

Usage Guidelines5/5

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

It explicitly says when NOT to use it ('要判断「现在在哪个界面」请用 `ocr`') and names the concrete scenario where it belongs (capturing evidence when acceptance fails, paired with `ocr`'s save_on_failure). Both the alternative and the selection condition are stated outright.

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