glass_screenshot
Capture a lossless WebP screenshot of the app window or a specified region to verify what is currently visible. For semantic state or transition completion, use wait tools instead.
Instructions
Capture current visual evidence from the app window (or an optional window-relative region) as a lossless WebP screenshot. This proves only what pixels are visible at capture time, not semantic state or transition completion; use glass_wait_for_element for an accessible condition/value, glass_wait_for_region for pixel transition completion, or glass_wait_stable for visual quiescence. A capture reaching off the display edge is clipped to the on-screen portion — the returned width/height are the actual captured size, so a frame smaller than the window/region means it was clipped; only a fully off-screen surface errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | Optional window-relative sub-rectangle to capture; omit for the whole window. | |
| window_id | No | Capture/observe this window (id from `glass_list_windows`) instead of the active one, without changing which window subsequent ops target. Omit for the active window. |