Skip to main content
Glama

Look at and drive the running game session

godot_game

Inspect and control a running Godot game: read the live node tree, get/set properties, call methods, step frames with input, record signals, reload scripts, and check layout, UI, rays, and errors.

Instructions

Ask the game godot_session started. op: tree (the live node tree), get (values now), set (a Node.property), call (a method), eval (a Godot Expression on the scene root), step (run frames with an input timeline counted from this step, sample watch, stop early until a condition holds; the same frame-exact input as godot_play), signals (record them; later steps list when they fired), layout (3D objects: position, size, and whether each rests on, floats above or sinks into what is below, plus scale mistakes), ray (what a physics ray from-to hits), ui (visible controls at window sizes: clipped text, off-screen panels, overlapping buttons, small targets), errors (what the game printed since the last call), reload (load edited scripts into the running game: nodes keep their values and run the new code from the next step; a script that does not compile stays as it was). Every answer ends with the new errors and warnings, runtime errors with their call chain. Time only moves on a step, so the session is deterministic. Use it to try a fix live, reach a state that is hard to reach, or watch a long scenario in parts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "op": "<op>"
    },
    "name": "godot_game"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYeswhat to do
toNoray: end
argsNocall: arguments as Godot values
exprNoeval: the expression, e.g. get_node("Hero").velocity.length()
fromNoray: start, Vector3(...) or Vector2(...)
nodeNocall: node path from the scene root
pathNoproject folder, or a file or folder inside it (relative to the server's folder; default: the current project)
rootNotree and layout: start at this node (default the scene root)
depthNotree: levels to show (default 3)
everyNostep: sample every n frames (default: about 10 samples)
filesNoreload: res:// scripts to reload (default: every script changed since the session started or the last reload)
inputNostep: "0 press jump; 10 release jump; 20 hold right 30"
limitNotree: nodes to show (default 80)
sizesNoui: window sizes such as 1280x720 or 720x1280 (default the size the project sets)
untilNostep: stop at the first frame where this holds, "Hero.is_on_floor() == true"
valueNoset: the new value as Godot writes it, e.g. Vector3(0, 30, 0)
watchNoget and step: values to read, e.g. "Hero.position", "Hero.is_on_floor()"
framesNostep: frames to run (default 60)
methodNocall: method name
targetNoset: Node.property
signalsNosignals: Node.signal to record

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.6.0
    • changedInput schema / properties / expr / description
      Previous value: -"eval: the expression"New value: +"eval: the expression, e.g. get_node(\"Hero\").velocity.length()"
    • changedInput schema / properties / path / description
      Previous value: -"The project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project."New value: +"project folder, or a file or folder inside it (relative to the server's folder; default: the current project)"
    • changedInput schema / properties / root / description
      Previous value: -"tree: start at this node (default the scene root)"New value: +"tree and layout: start at this node (default the scene root)"
    • changedInput schema / properties / value / description
      Previous value: -"set: the new value as Godot writes it"New value: +"set: the new value as Godot writes it, e.g. Vector3(0, 30, 0)"
    • changedInput schema / properties / watch / description
      Previous value: -"get and step: values to read, Node.property or Node.method()"New value: +"get and step: values to read, e.g. \"Hero.position\", \"Hero.is_on_floor()\""
  2. Addedv0.2.2

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that time only advances on a step (making the session deterministic), that every answer ends with new errors/warnings plus runtime error call chains, that reload preserves node values and leaves non-compiling scripts untouched, and that 'until'/'signals' have cross-step persistence. This is exactly the operational context an agent needs before mutating a live game.

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?

Front-loads the op inventory and then defines each op in a tight parenthetical, with no filler sentences. The single-paragraph, semicolon-heavy format is dense and the opening fragment ('Ask the game godot_session started') is awkward, but the size is justified by twelve ops.

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

Completeness4/5

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

Covers all twelve ops, the always-present error trailer, determinism, and reload failure behavior for a 21-parameter tool with no output schema. What it omits is minor shaping information such as default output ranges or truncation behavior for large trees, which the schema partly implies via depth/limit.

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 schema baseline already carries per-parameter meaning, but the description adds real value by binding parameters to ops (frames/input/watch/until go with step, sizes with ui, files with reload, root with tree and layout) and by specifying that step input timelines are counted from that step. This disambiguates the 20 optional params that would otherwise look interchangeable.

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?

Names the resource precisely (the running game session) and enumerates all twelve operations with what each returns (tree = live node tree, layout = 3D positions/rest state, ui = visible controls, ray = physics hit). Distinguishes itself from siblings by referencing godot_session as the prerequisite and godot_play as the equivalent for frame-exact input.

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?

The closing sentence gives concrete use cases (try a fix live, reach a hard-to-reach state, watch a long scenario in parts) and establishes the prerequisite that a godot_session must be running. It also points at godot_play for the same input timeline, though it never states when to prefer godot_play or godot_scenario over this tool instead.

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