insert_before_symbol
Add code before a specific symbol in GDScript files to modify Godot game projects. This tool helps developers insert content at precise locations within their scripts.
Instructions
Insert content before a named symbol in a GDScript file.
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": {
"file": "<file>",
"symbol": "<symbol>",
"content": "<content>"
},
"name": "insert_before_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the .gd file | |
| symbol | Yes | Name of the symbol to insert before | |
| content | Yes | Content to insert | |
| expectedHash | No | Expected content hash of the file. If provided, edit is rejected on mismatch. |