Screenshot / Editor Viewport
screenshot-viewportCapture the Godot editor's 3D or 2D viewport as a PNG for LLM inspection; optionally save the image into the project via savePath.
Instructions
Capture the Godot editor's main viewport (the 3D or 2D editing surface) and return it as a PNG image for direct LLM inspection. Set 'mode' to '3d' (default) for the 3D editor viewport or '2d' for the 2D editor viewport. The longest output edge is capped to keep the response transportable; oversized captures are scaled down (aspect preserved). NOTE: the viewport must have a live GPU render — a Godot launched with '--headless' has no rendering device and yields an empty image, which surfaces here as a structured error rather than a blank PNG. The image otherwise exists only in this conversation: when the user wants the picture as a file, pass 'savePath' and the PNG is also written inside the project (the result states 'Saved to ').
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": "screenshot-viewport"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Which editor viewport to capture: '3d' (the 3D editor surface, default) or '2d' (the 2D editor surface). Case-insensitive. | |
| savePath | No | Optional file to also write the PNG to when the user wants the picture as a file, inside the project: 'res://Screenshots/shot.png', 'Screenshots/shot.png' (relative to the project root) or an absolute path under it. Missing folders are created and .png is added when there is no extension. Refused: anything outside the project, user://, res://.godot/, this addon's folder, another extension, an existing file (it never overwrites). The image is still returned. Godot imports the PNG, so a .import file appears beside it. |