Skip to main content
Glama

Screenshot / Editor Viewport

screenshot-viewport

Capture 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

NameRequiredDescriptionDefault
modeNoWhich editor viewport to capture: '3d' (the 3D editor surface, default) or '2d' (the 2D editor surface). Case-insensitive.
savePathNoOptional 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.38.0
    • addedInput schema / properties / savePath
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
  2. Addedv0.35.1

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses the longest-edge cap and downscaling with aspect preserved, the headless/no-GPU failure surfacing as a structured error rather than a blank PNG, and that the image otherwise exists only in this conversation. The savePath restrictions (no overwrite, no paths outside project, .import side effect) are surfaced at a level of detail an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and mode selection are front-loaded in the first two sentences, with constraints and the savePath caveat following in a logical order. It is on the long side and the savePath sentence is dense, but no sentence is filler given the failure modes it must warn about.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must describe the return, and it does: a PNG image, edge-capped and scaled, or a structured error under headless. For a two-optional-parameter capture tool with rich annotations, an agent has everything it needs to call it correctly or diagnose failure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents both 'mode' and 'savePath' thoroughly, so the schema carries the parameter burden. The description only restates the default mode and adds the result-side detail that the output states 'Saved to <absolute path>' and that the image is still returned when saving. That is a small increment over the schema, consistent with the high-coverage baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Capture the Godot editor's main viewport ... return it as a PNG image') and narrows the surface to the 3D or 2D editing viewport, which implicitly separates it from the camera and isolated-capture siblings. It stops short of naming those siblings explicitly, so differentiation is inferred from the 'main viewport' qualifier rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear selection guidance for the two modes (default '3d', '2d' for the 2D surface) and a concrete trigger for savePath ('when the user wants the picture as a file'). It also states the headless prerequisite that makes the call fail. It never says when to prefer a sibling capture tool instead, so it is context-rich but not exclusionary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.