connect_signal
Persistently connect a signal on a source node to a method on a target node in a Godot scene, with automatic saving. Returns confirmation of the connection.
Instructions
Connect a signal on a source node to a method on a target node, persisting the connection in the .tscn. Use after get_node_signals to confirm the signal name on the source and the method name on the target. Connecting the same signal+method pair twice creates a duplicate connection — call get_node_signals first if uncertain. Saves automatically. Returns a plain-text confirmation naming the source, signal, target, and method. Errors if the signal does not exist on the source node or the method does not exist on the target node.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project | |
| nodePath | Yes | Source node path from scene root | |
| signal | Yes | Signal name on the source node (e.g. "pressed", "body_entered") | |
| targetNodePath | Yes | Target node path from scene root that receives the signal | |
| method | Yes | Method name on the target node to call when the signal fires |