script-modify
Add functions, variables, or signals to existing GDScript scripts without manual editing. Supports annotations and type hints.
Instructions
[compact alias of modify_script] Adds functions, variables, or signals to an existing GDScript. Use to extend scripts without manual editing. Supports @export, @onready annotations and type hints.
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>",
"modifications": "<modifications>"
},
"name": "script-modify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow. | |
| scriptPath | Yes | Path to existing .gd file relative to project (e.g., "scripts/player.gd") | |
| modifications | Yes | Array of modifications to apply | |
| reason | No | Optional reason/context for this change. Displayed in visualizer audit timeline. |