Skip to main content
Glama

run_project

Destructive

Start a Godot runtime session, spawned or attached to a game you launch, so you can take screenshots, simulate input, inspect UI and run scripts. Required before any in-game interaction.

Instructions

Start a runtime session: spawn the project (stdout/stderr captured; asks the user to confirm the first time per project), or with attach: true wait for a Godot you launch yourself (nothing spawned or captured). Required before take_screenshot, simulate_input, get_ui_elements and run_script; returns once the bridge answers. It becomes current; others keep running. Returns: projectPath, sessionMode, bridgePort, message; warnings leads on a start caveat. Errors if the bridge never answers.

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": {
      "projectPath": "<projectPath>"
    },
    "name": "run_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
sceneNoScene to run (path relative to project, e.g. "scenes/main.tscn"). Omit to use the project's main scene. Not valid with attach: true. Must end in .tscn, .scn, .escn, .tres or .res.
attachNoIf true, do not spawn Godot: inject the bridge and wait for a Godot process you launch yourself (up to 20s for it to start listening, 45s total once it has). Call before Godot launches, or start the launch in parallel, because Godot reads autoloads only at startup. One attach session per project; attaching again keeps this server's attached session unless its bridge is gone, and says so in warnings. Cannot be combined with scene, background or profiling. Nothing is captured: get_debug_output returns null logs with a warning, and the profiler is unavailable.
profilingNoAttach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch - a session already running cannot be profiled - and costs a little runtime overhead. Not valid with attach: true.
backgroundNoIf true, the game window is never shown on Windows and is moved off-screen after startup on other platforms; mouse input passes through to whatever is beneath it. Programmatic input (simulate_input, run_script) and screenshots stay fully active. It does not guarantee the game never takes keyboard focus. Not valid with attach: true.
bridgePortNoTCP port for the MCP bridge. Omit to auto-select a free port (recommended). Spawned sessions receive it through an environment variable; attach mode bakes it into the injected bridge script, so the Godot you launch listens on exactly this port. A port held by a live session on another project is refused.
projectPathYesPath to the Godot project directory

Output Schema

NameRequiredDescriptionDefault
messageYes
warningsNo
bridgePortYes
projectPathYes
sessionModeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv4.0.1
    • addedInput schema / properties / attach
      Added value: +{
      +  "description": "If true, do not spawn Godot: inject the bridge and wait for a Godot process you launch yourself (up to 20s for it to start listening, 45s total once it has). Call before Godot launches, or start the launch in parallel, because Godot reads autoloads only at startup. One attach session per project; attaching again keeps this server's attached session unless its bridge is gone, and says so in warnings. Cannot be combined with scene, background or profiling. Nothing is captured: get_debug_output returns null logs with a warning, and the profiler is unavailable.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / background / description
      Previous value: -"If true, hides the Godot window off-screen and blocks all physical keyboard and mouse input, while keeping programmatic input (simulate_input, run_script) and screenshots fully active. Useful for automated agent-driven testing where the window should not be visible or interactive."New value: +"If true, the game window is never shown on Windows and is moved off-screen after startup on other platforms; mouse input passes through to whatever is beneath it. Programmatic input (simulate_input, run_script) and screenshots stay fully active. It does not guarantee the game never takes keyboard focus. Not valid with attach: true."
    • changedInput schema / properties / bridgePort / description
      Previous value: -"TCP port for the MCP bridge. Omit to auto-select a free port (recommended). Delivered to the spawned process via an environment variable, so the bridge script on disk is unaffected by which port this session uses - safe for multiple sessions on the same project."New value: +"TCP port for the MCP bridge. Omit to auto-select a free port (recommended). Spawned sessions receive it through an environment variable; attach mode bakes it into the injected bridge script, so the Godot you launch listens on exactly this port. A port held by a live session on another project is refused."
    • changedInput schema / properties / bridgePort / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / profiling / description
      Previous value: -"Attach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch - a session already running cannot be profiled - and costs a little runtime overhead."New value: +"Attach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch - a session already running cannot be profiled - and costs a little runtime overhead. Not valid with attach: true."
    • changedInput schema / properties / scene / description
      Previous value: -"Scene to run (path relative to project, e.g. \"scenes/main.tscn\"). Omit to use the project's main scene."New value: +"Scene to run (path relative to project, e.g. \"scenes/main.tscn\"). Omit to use the project's main scene. Not valid with attach: true. Must end in .tscn, .scn, .escn, .tres or .res."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bridgePort": {
      +      "type": "number"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "projectPath": {
      +      "type": "string"
      +    },
      +    "sessionMode": {
      +      "enum": [
      +        "spawned",
      +        "attached"
      +      ],
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "projectPath",
      +    "sessionMode",
      +    "bridgePort",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv3.8.1
    • changedInput schema / properties / bridgePort / description
      Previous value: -"TCP port for the MCP bridge. Omit to auto-select a free port (recommended). The chosen port is baked into the project's `mcp_bridge.gd` at inject time, so the running Godot listens on exactly this port."New value: +"TCP port for the MCP bridge. Omit to auto-select a free port (recommended). Delivered to the spawned process via an environment variable, so the bridge script on disk is unaffected by which port this session uses - safe for multiple sessions on the same project."
  3. Changed1 schema field changedv3.6.0
    • changedInput schema / properties / profiling / description
      Previous value: -"Attach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch — a session already running cannot be profiled — and costs a little runtime overhead."New value: +"Attach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch - a session already running cannot be profiled - and costs a little runtime overhead."
  4. Changed1 schema field changedv3.4.0
    • addedInput schema / properties / profiling
      Added value: +{
      +  "description": "Attach Godot's own remote debugger so profile_project, start_profiler and stop_profiler can measure this session. Must be set at launch — a session already running cannot be profiled — and costs a little runtime overhead.",
      +  "type": "boolean"
      +}
  5. Addedv3.1.1
  6. Removedv3.0.0
  7. Addedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

With only destructiveHint=true supplied, the description carries the real behavioral load: stdout/stderr capture, a one-time user confirmation prompt per project, the fact that attach spawns and captures nothing, that the call returns only once the bridge answers, and that it errors if the bridge never answers. These are exactly the operational facts an agent needs before invoking it, and none of them are recoverable from the annotations.

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?

The sentence is front-loaded with the core action and mode split, then the prerequisites, then return/error behavior in a logical order. It is dense but long, with stacked parentheticals ("stdout/stderr captured; asks the user to confirm...") that cost a little readability against a tool of this complexity.

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 six-parameter session-lifecycle tool this covers the mode choice, launch-time-only constraints, capture differences, prerequisite ordering, return fields, warnings, and the failure case. Since an output schema exists, the brief returns mention is sufficient rather than redundant.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including the scene/attach/background/profiling exclusions is already documented. The description restates attach semantics ("nothing spawned or captured") rather than adding new parameter-level detail; its only extra signal is that the resulting session becomes current, which mildly informs the bridgePort/multi-session picture. Baseline 3 applies.

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?

"Start a runtime session: spawn the project ... or with attach: true wait for a Godot you launch yourself" gives a concrete verb, resource, and both operating modes. It also names the dependent siblings (take_screenshot, simulate_input, get_ui_elements, run_script), so an agent can place it precisely in the workflow.

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?

The description states the prerequisite relationship explicitly ("Required before take_screenshot, simulate_input, get_ui_elements and run_script") and gives the condition that selects attach mode over spawning. It also clarifies session coexistence ("It becomes current; others keep running"), which tells the agent it need not stop existing sessions first.

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