glass_screenshot
Captures a screenshot of an app window or a specified region within it as a lossless WebP image. Clips off-screen content and reports actual captured size.
Instructions
Capture the app window (or an optional window-relative region) as a screenshot (lossless WebP image). 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. |