capture_viewport
Save a screenshot of the rendered O3DE editor viewport to an image file for inspecting or sharing the current level view.
Instructions
Capture a screenshot of the editor viewport.
Captures the rendered frame with Atom's
FrameCaptureRequestBus.CaptureScreenshot, then waits on the client
for a new, fully written file (O3DE_CAPTURE_WAIT, default 15 s). A
level must be open: without one the engine accepts the capture and never
writes a file, which is reported as capture_not_written. A PySide6
widget grab is tried first, but it cannot run in the editor's embedded
interpreter on O3DE 26.10.0 (QApplication.instance() is None).
Args:
output_path: File path for the screenshot (.png, .jpg, .jpeg, .bmp, or .tga).
width: Scale width for the PySide6 grab only; ignored by the Atom
capture, so it has no effect on 26.10.0.
height: Scale height for the PySide6 grab only; ignored like width.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output_path": "<output_path>"
},
"name": "capture_viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |