Skip to main content
Glama

connect_signal

Connects a signal on a source node to a target method and persists the connection in the .tscn file, saving automatically. Use it to wire up game logic like button presses or collision events in Godot scenes.

Instructions

Connect a signal on a source node to a method on a target node and persist it in the .tscn. Use get_node_signals first to confirm the names. Saves automatically. Returns: nodePath, signal, targetNodePath, method and connected, which is read back from the saved scene (null with a leading warning if that read failed). Errors if the signal or method does not exist or the connection already exists. Errors while a runtime session is live on this project.

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>",
      "scenePath": "<scenePath>",
      "nodePath": "<nodePath>",
      "signal": "<signal>",
      "targetNodePath": "<targetNodePath>",
      "method": "<method>"
    },
    "name": "connect_signal"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodYesMethod name on the target node to call when the signal fires
signalYesSignal name on the source node (e.g. "pressed", "body_entered")
nodePathYesSource node path from scene root
scenePathYesScene file path relative to the project
projectPathYesPath to the Godot project directory
targetNodePathYesTarget node path from scene root that receives the signal

Output Schema

NameRequiredDescriptionDefault
methodYes
signalYes
nodePathYes
warningsNo
connectedYesWhether the saved scene holds the connection. Null when the scene could not be read back.
targetNodePathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "connected": {
      +      "description": "Whether the saved scene holds the connection. Null when the scene could not be read back.",
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "method": {
      +      "type": "string"
      +    },
      +    "nodePath": {
      +      "type": "string"
      +    },
      +    "signal": {
      +      "type": "string"
      +    },
      +    "targetNodePath": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "nodePath",
      +    "signal",
      +    "targetNodePath",
      +    "method",
      +    "connected"
      +  ],
      +  "type": "object"
      +}
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses persistence to the scene file, automatic save, the exact failure modes (missing signal/method, duplicate connection, live runtime session), and that the returned connected flag is read back from the saved scene with a null-plus-warning fallback if that read fails.

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?

Front-loads the action, then the prerequisite, then the persistence and return behavior, then the error cases. Every sentence conveys a distinct, actionable fact with no padding.

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 mutation tool with no annotations, the description covers the prerequisite lookup, side effects (automatic save), error conditions, and return semantics. An output schema exists, yet the return shape and its degraded case are still summarized in a way that aids correct interpretation.

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 all six parameters are already documented with examples for signal names and path semantics. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 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?

States a specific verb and resource: connecting a signal on a source node to a method on a target node, and persisting it in the .tscn. This is clearly separable from disconnect_signal and get_node_signals, which the description also references.

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 an explicit prerequisite workflow ("Use get_node_signals first to confirm the names") and states two blocking conditions: nonexistent signal/method, existing connection, and a live runtime session. It lacks an explicit when-not alternative (e.g., pointing to disconnect_signal for removal), but the guidance is concrete enough to act on.

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