tool_capture_window
Capture a window screenshot and save it to a file. Specify a window by handle or title to get screen-coordinate bounds and scale for accurate mapping.
Instructions
Capture a window screenshot and SAVE IT TO A FILE. Provide hwnd or title substring. Crops to the window's CLIENT area by default, so image pixel (0,0) is the same point click_at calls (0,0) — no frame offset to guess. Returns bounds = the screen rect (x,y,width,height) the image maps to, plus scale (multiply image pixels by it to get screen pixels; 1.0 unless you asked for downscaling). Also reports dpi_verified; when false, image pixels and input coordinates cannot be safely paired. Defaults to JPEG q80 — a 1080p shot is ~6-10x smaller than PNG, which is what keeps a long session's request body under the provider's 32 MiB cap. The bytes are NOT inlined as base64 by default (that costs ~12,500 tokens per shot as text); read the saved_path with read_image instead, which attaches the same picture for ~50 tokens. Pass include_data_uri=true only when a caller genuinely cannot read a file. Read-only — no input injection, no focus change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hwnd | No | ||
| title | No | ||
| max_dim | No | ||
| quality | No | ||
| save_path | No | ||
| client_only | No | ||
| image_format | No | jpeg | |
| include_data_uri | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||