edit_script
Replace a specific exact match in a GDScript file with new code, enabling precise find-and-replace patching of Godot scripts.
Instructions
Replaces one exact occurrence of old_text with new_text in a GDScript file (like a find-and-replace patch).
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": {
"project_path": "<project_path>",
"script_path": "<script_path>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "edit_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_text | Yes | ||
| old_text | Yes | ||
| script_path | Yes | ||
| project_path | Yes |