patch_symbol
Replace a function or class block by symbol name with automatic AST validation and rollback, preventing malformed edits in source files.
Instructions
Surgically replace a function or class block by symbol name. Automatically validates AST syntax and rolls back if invalid, guaranteeing zero malformed edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_code | Yes | The replacement source code for that symbol block. | |
| file_path | Yes | Path of the file to modify. | |
| symbol_name | Yes | Name of the function, class, or method being replaced. |