client_shot
Capture the client's window to a PNG image, handling window focus and state, with an optional save path.
Instructions
Capture the client's window to a PNG. NO FOCUS NEEDED.
Measured rather than assumed: the frame is live with the client at the very bottom of the z-order and live when it is in front. The one state it cannot survive is MINIMIZED -- the client area collapses to 0x0 and there is nothing to copy -- and that is refused with a hint saying to restore the window, not reported as an empty picture.
lit_fraction in the answer is the honest half: a black capture is exactly
the failure that otherwise reports success, so the fraction of non-black
pixels comes back with every shot. A dark frame is never failed -- night is
dark -- but a caller reading 0.0 knows the eyes were shut.
With no path the file lands in this project's own .dayz-mcp/shots.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| hint | No | ||
| error | No |