tool_capture_window
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.
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, and per-axis scale_x and scale_y. Multiply image coordinates by the corresponding scale and then add the bounds origin to get screen coordinates. A DPI-virtualized target can have different image-pixel and screen-pixel dimensions even without resizing. 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.
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": "tool_capture_window"
}
}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 | |||