Skip to main content
Glama

Keep and run scenario tests

godot_scenario
Idempotent

Save, list, and run deterministic headless regression scenarios that replay a scene with an input timeline and verify claims about the game state, so fixes stay protected from future breakage.

Instructions

Scenarios are regression tests kept in the project (.godotwright/scenarios/.json) that godotwright ci runs: a scene, an input timeline and claims about what the game did, run headless in Godot 4.7 and deterministic. op save takes the arguments of a godot_play run (scene, input, watch, frames, until, signals, expect: at least one claim), runs it once more and writes it only when every claim holds (undo with godot_undo); overwrite replaces one. op list shows each scenario and its claims; op run runs all, or the one called name (else those whose name contains it), and returns PASS per scenario and every failing claim with the value the game had and the frame. An error result when a run fails or Godot is missing. After godot_play with expect proves a fix, save it so the next change cannot break it unnoticed.

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

Input Schema

NameRequiredDescriptionDefault
opYeslist, run or save
nameNosave: the new scenario's name (letters, digits, _ or -); run and list: which ones (default all)
pathNoproject folder, or a file or folder inside it (relative to the server's folder; default: the current project)
inputNosave: timeline, "10 tap jump; 40 hold right 20"
sceneNosave: the res:// scene (default: the main scene)
untilNosave: stop when this holds; the scenario fails when it never does
watchNosave: extra values to sample
expectNosave: claims, "Hero.velocity.y == -400 @ 10", "Hero.landed >= 1"
framesNosave: physics frames to run
signalsNosave: signals to record, "Hero.landed"
overwriteNosave: replace a scenario with that name
timeout_secondsNotimeout of each run (default 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructive=false, idempotent=true; the description adds substantial behavior: headless deterministic execution in Godot 4.7, the write only happens when every claim holds (atomic on failure), undo is available via godot_undo, and an error result is returned when a run fails or Godot is missing. It also documents what a run returns (PASS per scenario, each failing claim with the observed value and frame), which the annotations cannot convey.

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?

Dense but front-loaded: the definition of a scenario comes first, then ops, then error behavior, then the workflow hook. Nearly every clause carries information, though the single-paragraph packing of three ops plus semantics makes it harder to scan than a bulleted structure would be.

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 12-parameter tool with no output schema, the description covers what an agent needs: invocation forms, storage location, determinism/timeout context, return shape (PASS lines and failing claims with value and frame), and error conditions. Nothing material is left for the agent to guess.

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 genuinely adds meaning: it clarifies that save reuses godot_play's argument set, that `expect` requires at least one claim, that `until` failing to hold fails the scenario, and that `name` supports substring matching at run time. The flaw is 'op `overwrite` replaces one', which implies an `overwrite` op value that the enum (list/run/save) does not permit — overwrite is actually a boolean parameter, and this wording could cause an invalid call.

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?

States a concrete verb+resource (keep and run scenario regression tests stored in .godotwright/scenarios/<name>.json) and then breaks the tool into its three ops with what each does. It explicitly names sibling tools it relates to (godot_play, godot_undo), so an agent can position it 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 Guidelines4/5

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

Gives a clear, actionable workflow rule — 'After godot_play with expect proves a fix, save it so the next change cannot break it unnoticed' — plus per-op selection (list vs run vs save) and the `name` fallback to substring matching for run. It stops short of explicit when-not-use guidance or naming godot_test/godot_check as alternatives, so it is not a full 5.

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