Skip to main content
Glama

take_screenshot

Read-only

Capture the running Godot viewport as a PNG and return an inline preview, full image, or saved path plus blank-frame stats to verify rendering.

Instructions

Save a PNG of the running viewport under .mcp/godot-runtime/screenshots/ (kept after stop_project). responseMode: preview (default; inline, fits default 960x540, max 1920x1080), full (inline PNG, for small text), path_only (no image). Returns: projectPath, path, size, stats {chromatic, dominant, distinct, likelyBlank} from the full PNG, so a blank frame shows without vision. warnings leads if stats is null or the image is too big to inline. Errors: no session, no frame rendered, bridge timeout.

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": "take_screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNoTimeout in milliseconds to wait for the screenshot, a whole number from 1 to 600000 (default: 10000); a value from 59001 to 60000 is refused, since the answer would not fit a client's 60s request timeout. Time spent waiting for the session queue comes off it, and a call left with under 2000 ms is refused with nothing sent. The game gives up on a frame that never renders after 5000 ms and reports that; a lower timeout expires first.
responseModeNoResponse payload mode. "preview" returns a bounded inline preview plus paths (default). "full" returns the full inline PNG. "path_only" returns paths only. An image file over 3 MiB, or a full PNG that could not be decoded, is not inlined: the path is returned with a leading warning.
previewMaxWidthNoWidth in pixels of the box the preview is fitted into when responseMode is "preview". Default: 960. Maximum: 1920; a larger value is clamped to it, not refused. Use responseMode "full" for the screenshot at its own size.
previewMaxHeightNoHeight in pixels of the box the preview is fitted into when responseMode is "preview". Default: 540. Maximum: 1080; a larger value is clamped to it, not refused.

Output Schema

NameRequiredDescriptionDefault
pathYes
sizeNo
statsYes
warningsNo
previewPathNo
previewSizeNo
projectPathYes
responseModeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv4.0.1
    • changedInput schema / properties / previewMaxHeight / description
      Previous value: -"Maximum preview height in pixels when responseMode is \"preview\" (default: 540)"New value: +"Height in pixels of the box the preview is fitted into when responseMode is \"preview\". Default: 540. Maximum: 1080; a larger value is clamped to it, not refused."
    • changedInput schema / properties / previewMaxWidth / description
      Previous value: -"Maximum preview width in pixels when responseMode is \"preview\" (default: 960)"New value: +"Width in pixels of the box the preview is fitted into when responseMode is \"preview\". Default: 960. Maximum: 1920; a larger value is clamped to it, not refused. Use responseMode \"full\" for the screenshot at its own size."
    • changedInput schema / properties / responseMode / description
      Previous value: -"Response payload mode. \"preview\" returns a bounded inline preview plus paths (default). \"full\" returns the full inline PNG. \"path_only\" returns paths only."New value: +"Response payload mode. \"preview\" returns a bounded inline preview plus paths (default). \"full\" returns the full inline PNG. \"path_only\" returns paths only. An image file over 3 MiB, or a full PNG that could not be decoded, is not inlined: the path is returned with a leading warning."
    • changedInput schema / properties / timeout / description
      Previous value: -"Timeout in milliseconds to wait for the screenshot (default: 10000)"New value: +"Timeout in milliseconds to wait for the screenshot, a whole number from 1 to 600000 (default: 10000); a value from 59001 to 60000 is refused, since the answer would not fit a client's 60s request timeout. Time spent waiting for the session queue comes off it, and a call left with under 2000 ms is refused with nothing sent. The game gives up on a frame that never renders after 5000 ms and reports that; a lower timeout expires first."
    • addedInput schema / properties / timeout / maximum
      Added value: +600000
    • addedInput schema / properties / timeout / minimum
      Added value: +1
    • changedInput schema / properties / timeout / type
      Previous value: -"number"New value: +"integer"
    • addedOutput schema / properties / projectPath
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / stats
      Added value: +{
      +  "properties": {
      +    "chromatic": {
      +      "type": "number"
      +    },
      +    "distinct": {
      +      "type": "number"
      +    },
      +    "dominant": {
      +      "type": "number"
      +    },
      +    "height": {
      +      "type": "number"
      +    },
      +    "likelyBlank": {
      +      "type": "boolean"
      +    },
      +    "width": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "width",
      +    "height",
      +    "chromatic",
      +    "dominant",
      +    "distinct",
      +    "likelyBlank"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / required
      Added value: +[
      +  "projectPath",
      +  "responseMode",
      +  "path",
      +  "stats"
      +]
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

The description goes well beyond readOnlyHint=true: it names the output directory, says files persist after stop_project, explains what warnings mean and why they lead, and enumerates the failure modes (no session, no frame rendered, bridge timeout). It also explains the stats block, so an agent can detect a blank frame without vision.

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?

It is front-loaded with the core action and destination, and every clause carries information. The "Returns:" enumeration of projectPath, path, size, and stats is partly redundant because an output schema exists, which costs a point.

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?

For a screenshot tool with four optional parameters, rich annotations, and an output schema, nothing an agent needs in order to call it correctly is missing: it covers side effects, mode choice, sizing caps, blank-frame detection, and error cases.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains why "full" exists (small text) and how the preview box defaults and caps work. It largely restates the enum semantics that the schema already documents, which keeps it below a 5.

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 concrete verb and resource: "Save a PNG of the running viewport" plus the destination path. It also adds a persistence fact (kept after stop_project). It doesn't distinguish itself from the sibling render_movie, which also captures the viewport, so it stops short of full sibling differentiation.

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

Usage Guidelines3/5

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

There is no explicit statement of when to call this tool versus alternatives, or of prerequisites such as a session that must already be running (hinted at only by the "no session" error). The parentheticals do give mode-selection guidance (preview default, full "for small text", path_only for no image), which is useful but is parameter guidance, not tool-level usage guidance.

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