Editor Screenshot
editor_screenshotCapture a screenshot of the Godot editor viewport or running game.
Instructions
Capture a screenshot of the Godot editor viewport or running game.
Picking a source: the default "viewport" captures the editor's 3D
viewport, which is empty if the edited scene has no Node3D anywhere in
the tree (or no scene is open). Those cases return EDITOR_NOT_READY
with error.data = {editor_state: "viewport_not_3d", scene_root_type}
and an actionable error.message — switch to "cinematic" if the
scene has a Camera3D, or open a scene with 3D content.
Sources:
"viewport" (default): editor 3D viewport. Requires Node3D content in the edited scene (root or any descendant); see above for the no-3D-content / no-scene error shape.
"viewport_2d": editor 2D viewport. Use for 2D scenes. Not compatible with view_target/coverage/elevation/azimuth/fov.
"cinematic": render edited scene through its active Camera3D (no editor gizmos). Prefers a Camera3D marked
current; falls back to the first Camera3D found in a depth-first walk. NODE_NOT_FOUND only when the scene contains no Camera3D at all."game": running game's framebuffer (only when project is running). A backgrounded/minimized game window freezes its main loop; the capture then returns the last rendered frame with
stale_frame: trueand anotein the metadata — focus the game window and retry for a current frame.GAME_HELPER_TIMEOUTmeans the game process never replied at all (nothing rendered yet, main thread blocked, or helper dead) — focus the window and retry, or use game_command to confirm liveness.
include_image=True (default) returns an MCP ImageContent block.
view_target (comma-separated Node3D paths) reframes editor camera;
AABB metadata always returned. coverage=True with view_target
captures perspective + orthographic top-down references.
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": "editor_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fov | No | Camera FOV in degrees. Tight 20-30 = zoom; 60-75 = context. | |
| width | No | Cinematic render width, 1..4096 pixels. Supply with height. Omit both to use the editor viewport size. | |
| height | No | Cinematic render height, 1..4096 pixels. Supply with width. | |
| source | No | "viewport" | "viewport_2d" | "cinematic" | "game". Default "viewport". | viewport |
| azimuth | No | Camera azimuth in degrees (0=front, 90=right). | |
| save_to | No | Cinematic only: save the full render to a res:// PNG path. Parent directories are created. max_resolution and transport limits affect only the inline preview, not the saved PNG. With include_image=False, only metadata crosses the transport; saved_path, saved_width, saved_height and saved_bytes describe the file. File writes require a writable editor and cannot be undone. | |
| coverage | No | With view_target, capture two reference shots + AABB. | |
| elevation | No | Camera elevation in degrees (0=level, 90=overhead). | |
| overwrite | No | Replace an existing save_to PNG. Default False. | |
| session_id | No | Optional Godot session to target. Empty = active session. | |
| user_prompt | No | Optional context from the agent that requested the capture. With Vision Routing enabled it is sent alongside the image so the vision model can describe what the agent is looking for. | |
| view_target | No | Node3D scene path(s) to frame, comma-separated. | |
| include_image | No | Return image data. Default True. | |
| max_resolution | No | Maximum longest edge. Default 640. 0 removes the requested cap. Large PNGs are downscaled further to fit the MCP transport; metadata reports the actual and original dimensions. |