edit_lines_in_symbol
Edit exact text inside a named function or class without reading the whole file first. Provide symbol name, old_string, and new_string; replace all matches when needed.
Instructions
Edit code without reading the file first: exact old_string -> new_string, like Edit, matched only inside one function or class. Edit refuses a file you have not Read, which in a large file means reading all of it; this needs only the symbol name. replace_all=true changes every occurrence inside that symbol.
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": {
"symbol_name": "<symbol_name>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "edit_lines_in_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name/path (default: active). | |
| file_path | No | Optional file path to disambiguate symbols. | |
| new_string | Yes | Replacement text. | |
| old_string | Yes | Exact text to find inside the symbol body (must be unique within the symbol unless replace_all=true). | |
| replace_all | No | If true, replace every occurrence in the symbol body (default false). | |
| symbol_name | Yes | Function/method/class name to edit inside. |