set_scene_script
Attach or detach GDScript from Godot scene nodes, automatically updating scene files with proper resource references.
Instructions
Attach a GDScript to a node in a scene, or detach the current script. Automatically adds the ext_resource entry to the .tscn file.
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": {
"projectPath": "<projectPath>",
"scenePath": "<scenePath>",
"nodePath": "<nodePath>"
},
"name": "set_scene_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the project directory | |
| scenePath | Yes | Scene file path | |
| nodePath | Yes | Node path to attach the script to (e.g. . for root, or Player) | |
| scriptPath | No | Script path (res:// or relative). Omit to detach the current script. |