capture_screen
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
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | ||
| window | No | ||
| max_side | No | ||
| save_path | No |