Skip to main content
Glama

Play a scene with input

godot_play
Idempotent

Run a Godot scene headless for physics frames with scripted input and watch node or action values per frame; get deterministic results, errors, prints, and optional assertions for play-testing.

Instructions

Run a scene in Godot 4.7 headless for some physics frames with an input timeline, and return a table of the watched values per frame plus errors and prints. Each input lands on exactly that physics frame and runs are deterministic. input steps: a frame, a verb (press, release, tap, or hold with a frame count) and an action or event such as Key:Space. watch: a node path from the scene root, a dot, then a property or method call. until stops at the first frame a condition holds; signals records when signals fire, with their arguments; summary: true gives one line per watched value (start, end, min, max, first change), cheaper on long runs; expect claims ("Heli.health > 0", "Heli.position.y < 1 @ 90", or how often a recorded signal fired) make the result an error when one fails, so a run doubles as a test; keep a passing run with godot_scenario op save and the same arguments. An error result when the run does not finish or Godot reports an error; an unknown input action is a warning. Project files are not changed (it runs a temporary script in .godot/godotwright/). For tests kept in the project use godot_test; for load errors godot_check.

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

Input Schema

NameRequiredDescriptionDefault
pathNoproject folder, or a file or folder inside it (relative to the server's folder; default: the current project)
everyNosample every n frames (default 10); frames with input and the last frame are always sampled
inputNotimeline: "10 press jump; 30 release jump; 40 hold right 20; 50 tap Key:Space"
sceneNothe res:// scene to run (default: the main scene)
untilNostop at the first frame where this holds: "Heli.is_on_floor() == true"
watchNovalues to sample: Player.position, Player.velocity.y, Player.is_on_floor()
expectNoclaims to check: "Heli.health > 0" (last frame) or "Heli.position.y < 1 @ 90"; their values are watched; on a recorded signal, "Heli.landed >= 1" counts how often it fired
framesNophysics frames to run (default 120)
signalsNosignals to record: "Heli.landed", "Deck.body_entered"
summaryNoone line per watched value instead of a table (samples every frame)
timeout_secondsNotimeout of the run (default 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.0
    • changedInput schema / properties / expect / description
      Previous value: -"claims to check: \"Heli.health > 0\" (last frame) or \"Heli.position.y < 1 @ 90\"; their values are watched"New value: +"claims to check: \"Heli.health > 0\" (last frame) or \"Heli.position.y < 1 @ 90\"; their values are watched; on a recorded signal, \"Heli.landed >= 1\" counts how often it fired"
    • 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)"
  2. Changed4 schema fields changedv0.2.2
    • addedInput schema / properties / expect
      Added value: +{
      +  "description": "claims to check: \"Heli.health > 0\" (last frame) or \"Heli.position.y < 1 @ 90\"; their values are watched",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / signals
      Added value: +{
      +  "description": "signals to record: \"Heli.landed\", \"Deck.body_entered\"",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / summary
      Added value: +{
      +  "description": "one line per watched value instead of a table (samples every frame)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "stop at the first frame where this holds: \"Heli.is_on_floor() == true\"",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / path / description
      Previous value: -"Project directory or a path inside it (default: the current project)."New 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."
  4. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: each input lands on exactly that physics frame, runs are deterministic, failures and Godot errors produce an error result while unknown actions only warn, and the run writes only a temporary script under .godot/godotwright/ leaving project files untouched (consistent with destructiveHint=false). It also flags that summary is cheaper on long runs, which is real behavioral guidance not present in 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.

Conciseness4/5

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

Front-loaded with the action and return shape, then parameter guidance, then routing to siblings — a sensible order with no filler sentences. It is dense and semicolon-packed, so a first-time reader has to work a little, but each clause carries distinct information.

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?

With 11 optional parameters and no output schema, the description still explains what comes back (per-frame table with errors and prints), what makes a call fail, and where files are written. Nothing needed to invoke this correctly is missing.

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 genuine meaning: timeline grammar per step, that until halts on the first satisfying frame, that summary samples every frame, and that expect failures convert the result to an error. Minor gap: no guidance on how path interacts with scene resolution when both are given.

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 ('Run a scene in Godot 4.7 headless for some physics frames with an input timeline') and states the return shape ('a table of the watched values per frame plus errors and prints'). It also names the sibling tools it is not (godot_test, godot_check), so an agent can route 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?

Gives explicit inclusion and exclusion rules: use this plus godot_scenario op save to keep a passing run as a test, use godot_test for tests kept in the project, and godot_check for load errors. The 'run doubles as a test' framing clarifies when expect-based verification is the right call versus a plain run.

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