Skip to main content
Glama

attach_project

Destructive

Inject the MCP bridge into a Godot process you launch yourself, then wait for it to start listening. Use before Godot launches to absorb cold-start delays; returns the resolved bridge port.

Instructions

Inject the MCP bridge into a Godot process you launch yourself, then wait up to 20s for the bridge to start listening and up to 45s total once it has, so a large project's cold start is absorbed; a port that listens but answers no ping gives up sooner. Call BEFORE Godot launches - Godot reads autoloads only at process start, so a late call returns "bridge did not respond." Recommended pattern: kick off the Godot launch in parallel with this call so the wait absorbs startup. Prefer run_project unless MCP must not spawn Godot. Only one attach session is supported per project at a time (attach mode has no env-var channel, so port and token must be baked into the one shared script); a second attach_project on a project another session already attached to is refused, naming that session. Returns plain-text status with the resolved bridge port. Call detach_project or stop_project when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bridgePortNoTCP 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.
projectPathYesPath to the Godot project directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.1
  2. Removedv3.0.0
  3. Changed1 schema field changedv2.3.0
    • addedInput schema / properties / waitForBridge
      Added value: +{
      +  "description": "If true, poll the bridge until it responds (up to 15 seconds). Use this after Godot is already running to confirm runtime tools are ready. Defaults to false.",
      +  "type": "boolean"
      +}
  4. Addedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

The description discloses the injection side effect, the timeout and fallback behavior, the refusal of a second attach session, the plain-text return, and the cleanup calls (detach_project/stop_project). The destructiveHint annotation is set, but the description goes far beyond it by explaining what destructive action occurs (baking port and token into the shared script) and the operational details.

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 description is long but every sentence carries distinct information—timing, alternative, limitation, return format, cleanup. It is front-loaded with the core action and the sibling-routing guidance, and each subsequent sentence addresses a concrete operational concern without redundancy.

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?

Given the tool's complexity (timing, side effects, concurrency, failure modes), the description is comprehensive: it covers when to use it, how to precede it, what to expect, and how to finish. Nothing an agent needs to invoke it correctly is missing.

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?

Although schema coverage is 100%, the description adds critical semantic value: it explains that omitting bridgePort auto-selects a free port, that the chosen port is baked into mcp_bridge.gd, and that the resolved port is returned. This goes beyond the schema's basic type/description and helps an agent make an informed choice.

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 clear verb ('inject') and resource ('MCP bridge into a Godot process'), explains the waiting behavior and readiness check, and explicitly differentiates from run_project. The description makes it unambiguous what this tool does and how it differs from its sibling.

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?

Provides explicit guidance: 'Prefer run_project unless MCP must not spawn Godot' names the alternative and the deciding condition. It also specifies when to call ('Call BEFORE Godot launches'), recommends a parallel launch pattern, and warns about the one-session-per-project limitation, leaving no ambiguity about when and how to use it.

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