sqo_edit_symbol
Edit exact functions, classes, or Class.method symbols by name using AST-level replace, insert, or delete actions, with automatic backups and syntax rollback to prevent broken code.
Instructions
Serena-Class Surgical Symbol-Level AST Mutator (v10.0): edits exact functions, classes, or Class.method symbols by name (-85% Output Tokens!) with automatic Time-Machine backup and <8ms syntax auto-rollback.
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": {
"workspace": "<workspace>",
"file_path": "<file_path>",
"symbol": "<symbol>",
"action": "<action>"
},
"name": "sqo_edit_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Replacement or inserted source block. | |
| action | Yes | Mutation operation. | |
| symbol | Yes | Symbol or Class.method name to mutate. | |
| file_path | Yes | Target source file path. | |
| workspace | Yes | Workspace root directory. |