game_script
game_scriptAttach, detach, or retrieve the source code of GDScript files on specific nodes in the Godot game engine.
Instructions
Attach, detach, or get source of node scripts
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": {
"nodePath": "<nodePath>",
"action": "<action>"
},
"name": "game_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: attach, detach, get_source | |
| source | No | GDScript source code (for attach) | |
| nodePath | Yes | Path to the node | |
| className | No | Class the script extends |