screenshot_background
Capture hidden, minimized, or background windows without bringing them to the foreground using the Win32 PrintWindow API. Use this tool when windows must remain hidden or cannot be made visible for capture.
Instructions
Purpose: Capture a window that is hidden, minimized, or behind other windows using Win32 PrintWindow API. Details: Uses PW_RENDERFULLCONTENT (fullContent=true, default) for GPU-rendered content in Chrome, Electron, and WinUI3 apps. Supports same detail and dotByDot modes as screenshot. Default mode scales to maxDimension=768; dotByDot=true gives 1:1 WebP with origin in response — compute screen coords: screen_x = origin_x + image_x. grayscale=true reduces size ~50%. dotByDotMaxDimension caps resolution; response includes scale (screen_x = origin_x + image_x / scale). Prefer: Prefer screenshot(windowTitle=X) for visible windows (faster, no API overhead). Use screenshot_background when the window must stay hidden or cannot be brought to foreground. Caveats: Default (scaled) mode: image pixels ≠ screen pixels — always use dotByDot=true + origin for mouse_click coords. Set fullContent=false for legacy or game windows where GPU rendering causes 1-3s delay or black capture. Some DX12 games may not capture correctly even with fullContent=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| windowTitle | Yes | Title (partial match) of the window to capture | |
| region | No | Capture only this sub-region of the window (window-local image coordinates). Coordinates are in image pixels, not screen pixels (may differ on high-DPI). Useful to exclude browser chrome (tabs/address bar): e.g. {x:0, y:120, width:1920, height:900}. | |
| maxDimension | No | Max width or height in pixels (default 768). Use 1280 to read small text or fine UI details. | |
| dotByDot | No | 1:1 pixel mode — no scaling, WebP compression. When region is also specified, origin reflects the window + region offset for coordinate math. | |
| dotByDotMaxDimension | No | Cap the longest edge (pixels) when dotByDot=true. Response includes scale factor: screen_x = origin_x + image_x / scale. | |
| grayscale | No | Convert to grayscale. Reduces file size ~50% for text-heavy content. | |
| webpQuality | No | WebP quality when dotByDot=true. | |
| fullContent | No | Use PW_RENDERFULLCONTENT flag (default true) to capture GPU-rendered windows (Chrome, Electron, WinUI3). Set false for legacy mode (faster, but GPU windows may appear black). If this call hangs on a game/video window, retry with fullContent=false. |