attach_script
Attach an existing GDScript file to a specific node in a Godot scene by providing project, scene, node, and script paths.
Instructions
Attach an existing GDScript to a node in a 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": {
"projectPath": "<projectPath>",
"scenePath": "<scenePath>",
"nodePath": "<nodePath>",
"scriptPath": "<scriptPath>"
},
"name": "attach_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodePath | Yes | Node path like root/Player | |
| scenePath | Yes | Scene file relative to project | |
| scriptPath | Yes | Script path relative to project, e.g. scripts/player.gd | |
| projectPath | Yes | Path to the Godot project directory |