attach_script
Attach a script to a node in a Godot scene by specifying the scene file, node path, and script resource.
Instructions
Attach a script to a node.
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": {
"scene_path": "<scene_path>",
"node_path": "<node_path>",
"script_path": "<script_path>"
},
"name": "attach_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_path | Yes | Node path to attach script to | |
| scene_path | Yes | Path to .tscn file | |
| script_path | Yes | Script resource path (e.g. "res://scripts/player.gd") |