glass_screenshot
Capture lossless WebP screenshots of GUI windows or regions, with optional accessibility annotations, for visual debugging and inspection without switching the active window.
Instructions
Capture current visual evidence as lossless WebP, not semantic state or transition completion. annotations:accessibility adds numbered elements and an untrusted legend for the active window, refreshing actionable IDs. Requires an accessibility tree. Off-display captures are clipped: returned dimensions disclose the actual size; fully off-screen surfaces error. Optional window_id observes without switching the active window; unavailable with annotations.
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": "glass_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | Optional window-relative sub-rectangle to capture; omit for the whole window. | |
| max_width | No | Maximum returned image width; shrinks after crop, preserving native comparison pixels. | |
| window_id | No | Observe this current glass_list_windows ID without selecting it; omit for active window. | |
| max_height | No | Maximum returned image height; omit both limits for native output. | |
| annotations | No | "accessibility" overlays numbered elements and a legend; active window only. | |
| require_full | No | Fail if the backend cannot prove the entire requested window/region was captured. Independent of preview resizing. |