Skip to main content
Glama

Editor State

editor_state

Get current Godot editor state: version, readiness, open scene, play state.

Instructions

Get current Godot editor state: version, readiness, open scene, play state.

Resource form: godot://editor/state — prefer for active-session reads. Also reachable as editor_manage(op="state") (same handler) for clients that prefer a single rolled-up tool.

Code-mode MCP adapters keep the server and tool names separate: call('godot-ai', 'editor_state', {}). Never pass a server-prefixed tool name such as godot-ai/get_editor_state; that is neither the adapter's call signature nor a registered tool. For dedicated current- scene data, use readResource('godot-ai', 'godot://scene/current').

Side effect: refreshes the server's session readiness cache from the live editor reply. Useful as a recovery step after a write call is rejected as EDITOR_NOT_READY (state=playing) when you already know the game has stopped — calling editor_state once syncs the cache and the next write proceeds. Issue #262.

Response includes game_status for authoritative game liveness, plus helper_live (status == "live") and session_active (status not in {"not_live", "stopped"}) mirrored from the same fields inside game_status. is_playing remains raw editor play-state; use game_status.status for liveness decisions. started_by identifies MCP versus editor launches; elapsed_s reports run age. last_input_age_s is a sampled idle estimate, with input_sample_age_s for freshness; null means unknown. Godot AI injected input is excluded. Other nodes may consume input before the helper sees it; even fresh samples do not prove device idle. game_status.status="break" means the game process is parked in a remote-debugger break (boot-time parse errors do this before the game helper registers); it will not resume on its own — call project_manage(op="stop").

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_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idNoOptional Godot session to target. Empty = active session.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.4
  2. Removedv3.0.7
  3. First observedv2.9.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and then some: it discloses the hidden side effect of refreshing the session readiness cache, explains which fields are authoritative (game_status.status vs is_playing), and warns that game_status.status="break" will not resume on its own. It also hedges the reliability of last_input_age_s (sampled, null means unknown, injected input excluded), which is exactly the kind of caveat an agent cannot get from structured fields.

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

Conciseness5/5

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

The core action is front-loaded in sentence one, followed by alternate access paths, then recovery guidance, then field semantics. Given the tool's real complexity (cache side effect, break-state trap, multiple access paths), almost every sentence earns its place.

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?

Complete for a state-read tool: it covers alternate invocation paths, the side effect on server state, the trap condition (break state) with the exact remediation tool, and which fields to trust. An agent has everything needed to call it and interpret the result.

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

Parameters5/5

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

Schema coverage is 100% for the single optional session_id, so the schema already defines the parameter; the description adds no competing or contradictory meaning. Baseline 3 applies because the schema does the heavy lifting here.

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

Purpose5/5

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

Opens with a specific verb and resource: "Get current Godot editor state: version, readiness, open scene, play state." The enumerated fields make the return surface concrete, and it names the sibling path editor_manage(op="state") and the alternative resource godot://scene/current so an agent can distinguish it from other read tools without opening a schema.

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

Usage Guidelines5/5

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

Explicitly says to prefer the resource form godot://editor/state for active-session reads, points to readResource('godot-ai', 'godot://scene/current') for dedicated scene data, and prescribes a concrete recovery flow (call once after an EDITOR_NOT_READY rejection). It even states the anti-pattern to avoid (server-prefixed tool names).

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