attach_script
Attach a GDScript file to a specified node in the scene to add custom behavior.
Instructions
Attach a GDScript to a node in the scene
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": {
"script_path": "<script_path>",
"node_path": "<node_path>"
},
"name": "attach_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_path | Yes | Node to attach script to (e.g. 'Player' or '' for scene root) | |
| script_path | Yes | Script file path to attach |