Scene Wiring
Connect signals, set exported variables, and manage node metadata.
"Wiring" refers to the relationships between nodes that are not part of the scene tree hierarchy — signal connections, export variable values, and metadata entries.
Operations
signal_connect
Connect a signal from one node to a method on another.
{
"op": "signal_connect",
"project_path": "/home/user/my-game",
"scene": "scenes/level_01.tscn",
"from_node": "Level/Enemy_0/DetectionZone",
"signal": "body_entered",
"to_node": "Level/Enemy_0",
"method": "_on_detection_zone_body_entered"
}| Parameter | Type | Required | Description |
|---|---|---|---|
binds | any[] | optional default: null | Optional extra arguments to pass to the method. |
flags | number | optional default: null | Optional connection flags bitmask (CONNECT_DEFERRED=1, CONNECT_PERSIST=2, CONNECT_ONE_SHOT=4). CONNECT_PERSIST is added automatically for scene serialization. |
method_name | string | required | Method name to call on the target node. |
project_path | string | required | Absolute path to the Godot project directory. |
scene_path | string | required | Path to the scene file relative to the project root. |
signal_name | string | required | Signal name (e.g., "pressed", "body_entered"). |
source_path | string | required | Path to the node emitting the signal (relative to scene root, e.g., "Button1"). |
target_path | string | required | Path to the node receiving the signal. |
Response:
{
"op": "signal_connect",
"from_node": "Level/Enemy_0/DetectionZone",
"signal": "body_entered",
"to_node": "Level/Enemy_0",
"method": "_on_detection_zone_body_entered",
"result": "ok"
}signal_disconnect
Remove a signal connection.
{
"op": "signal_disconnect",
"project_path": "/home/user/my-game",
"scene": "scenes/level_01.tscn",
"from_node": "Level/Enemy_0/DetectionZone",
"signal": "body_entered",
"to_node": "Level/Enemy_0",
"method": "_on_detection_zone_body_entered"
}| Parameter | Type | Required | Description |
|---|---|---|---|
method_name | string | required | Method name that was connected. |
project_path | string | required | Absolute path to the Godot project directory. |
scene_path | string | required | Path to the scene file relative to the project root. |
signal_name | string | required | Signal name to disconnect. |
source_path | string | required | Path to the node emitting the signal. |
target_path | string | required | Path to the node that was receiving the signal. |
Response:
{
"op": "signal_disconnect",
"from_node": "Level/Enemy_0/DetectionZone",
"signal": "body_entered",
"result": "ok"
}signal_list
List all signal connections on a node.
{
"op": "signal_list",
"project_path": "/home/user/my-game",
"scene": "scenes/level_01.tscn",
"node": "Level/Enemy_0/DetectionZone"
}| Parameter | Type | Required | Description |
|---|---|---|---|
node_path | string | optional default: null | Optional: filter connections involving this node (as source or target). |
project_path | string | required | Absolute path to the Godot project directory. |
scene_path | string | required | Path to the scene file relative to the project root. |
Response:
{
"signals": [
{
"signal": "body_entered",
"to_node": "Level/Enemy_0",
"method": "_on_detection_zone_body_entered",
"flags": 0
}
]
}Setting @export variables
@export variables are set the same way as any built-in property — use node_set_properties. Godot's property system makes no distinction between script-defined exports and built-in node properties at the API level.
{
"op": "node_set_properties",
"project_path": "/home/user/my-game",
"scene": "scenes/enemy.tscn",
"node": "Enemy",
"properties": {
"patrol_speed": 3.5,
"alert_speed": 8.0,
"detection_range": 10.0,
"attack_damage": 25,
"health": 100
}
}Example conversation: Wiring a jump pad
Common signal connections
Area3D detection
{
"from_node": "Enemy/DetectionZone",
"signal": "body_entered",
"to_node": "Enemy",
"method": "_on_body_entered"
}Button press
{
"from_node": "UI/HUD/AttackButton",
"signal": "pressed",
"to_node": "Player",
"method": "_on_attack_button_pressed"
}Timer timeout
{
"from_node": "Enemy/AttackCooldownTimer",
"signal": "timeout",
"to_node": "Enemy",
"method": "_on_attack_cooldown_timeout"
}AnimationPlayer finished
{
"from_node": "Player/AnimationPlayer",
"signal": "animation_finished",
"to_node": "Player",
"method": "_on_animation_finished"
}Tips
Check existing connections before adding new ones. Use signal_list to avoid creating duplicate connections — Godot will error or double-fire if the same connection is added twice.
The to_node method must exist. Director validates that the to_node has a script, but not that the method exists in that script. A missing method will cause a runtime error when the signal fires. Double-check method names.
Use spatial_inspect with include: ["signals"] to see connections in the running game. This is the fastest way to verify that wiring applied correctly.
node_set_properties works for @export variables too. Things like enemy health, damage, speed, and range are usually @export variables — set them with node_set_properties just like any built-in property.