attach_script
Attach an existing .gd script to a node in a Godot scene. Specify the project, scene, node, and script paths to bind the script to the node.
Instructions
Attach an existing script 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 |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Path to the scene file | |
| nodePath | Yes | Path to the node | |
| scriptPath | Yes | Path to the .gd script (relative to project) |