apply_rename
Rename a symbol across all usages, detecting collisions first. Preview changes with dry-run mode, then apply to modify source files.
Instructions
Rename a symbol across all usages (definition + all importing files). Runs collision detection first and aborts on conflicts. Dry-run by default — preview the plan, then re-call with dry_run: false to apply. Returns the list of edits applied. Modifies source files when dry_run is false. Use check_rename first to verify safety; use plan_refactoring with type="rename" to preview edits. Returns JSON: { success, edits: [{ file, old_text, new_text }], filesModified }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol_id | Yes | Symbol ID to rename (from search or outline) | |
| new_name | Yes | New name for the symbol | |
| dry_run | No | Preview changes without applying (default: true). Set to false to apply. | |
| confirm_large | No | Required when >20 files would be modified. Acknowledges large-scale change. |