connect_signal
Connect a source node's signal to a target node's method in a Godot scene, saving the connection automatically. Use get_node_signals to verify names before linking.
Instructions
Connect a signal on a source node to a method on a target node, persisting it in the .tscn. Use get_node_signals first to confirm names - connecting the same pair twice creates a duplicate connection. Saves automatically. Returns a plain-text confirmation naming source, signal, target, and method. Errors if the signal or method does not exist. Errors while a Godot runtime session is active on this project; stop_project (or detach_project) clears it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | Method name on the target node to call when the signal fires | |
| signal | Yes | Signal name on the source node (e.g. "pressed", "body_entered") | |
| nodePath | Yes | Source node path from scene root | |
| scenePath | Yes | Scene file path relative to the project | |
| projectPath | Yes | Path to the Godot project directory | |
| targetNodePath | Yes | Target node path from scene root that receives the signal |