attach_script
Attach compatible GDScript or C# scripts to scene nodes, executing project constructors and refusing unavailable scripts before saving; C# needs Godot .NET and a built assembly.
Instructions
Attach a compatible GDScript or C# script to a scene node. Executes project constructors; refuses unavailable scripts before saving. C# requires Godot .NET and a built assembly.
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>",
"scriptPath": "<scriptPath>"
},
"name": "attach_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodePath | Yes | ||
| scenePath | Yes | ||
| scriptPath | Yes | ||
| projectPath | Yes |