edit_script
Replace a specific text segment in a GDScript file to update script logic or fix errors. Specify the file path, exact old text, and new replacement text.
Instructions
Edit an existing GDScript file by replacing a text segment
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": {
"path": "<path>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "edit_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Script file path (e.g. 'res://scripts/player.gd') | |
| new_text | Yes | Replacement text | |
| old_text | Yes | Exact text to find and replace |