modify_script
Overwrite GDScript files in Godot 4 projects by providing new content, enabling direct script modification through natural language commands.
Instructions
Overwrite a GDScript file with new content.
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>",
"scriptPath": "<scriptPath>",
"newContent": "<newContent>"
},
"name": "modify_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the project directory | |
| scriptPath | Yes | Script path (res:// or relative to project) | |
| newContent | Yes | Full new content of the script |