screenshot
Capture the running game or 2D editor viewport as an image for visual inspection. Optionally annotate interactive UI controls with numbered marks and return a legend for targeted clicks.
Instructions
Capture an image the agent can see. target=game (default) screenshots the RUNNING game via the runtime channel; target=editor captures the 2D editor viewport (PNG only). Token-cost dials (game target, 1.10+): scale=0.5 quarters the pixels; format=jpeg|webp with quality (default 0.8) compresses far below PNG for game frames; region=[x,y,w,h] crops (clamped). annotate=ui draws numbered Set-of-Mark boxes over every visible interactive control and ALSO returns the legend as structured {marks:[{i, path, rect, text?}]} â one glance answers both 'does it look right' and 'what can I click where'; follow up with click_control path=. For pure functional state, ui_snapshot is cheaper than any image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | 0.05..1.0 downscale before encode (game target; default 1.0) | |
| format | No | png (default) | jpeg | webp (game target) | |
| region | No | [x,y,w,h] pixel crop | |
| target | No | game | editor | |
| quality | No | jpeg/webp quality 0.1..1.0 (default 0.8) | |
| save_to | No | also write the frame to this path (res://, user:// or absolute) so later captures can be diffed against it â the agent still gets the image inline | |
| annotate | No | 'ui' = draw numbered marks on interactive controls + return the legend (game target) | |
| max_marks | No | cap on annotate marks (default 40) |