remove_dead_code
Remove dead code symbols after verifying they are unused. Preview changes with a dry run, then apply to delete. Alerts about orphaned imports.
Instructions
Safely remove a dead symbol from its file. Verifies the symbol is actually dead (multi-signal detection or zero incoming edges) before removal. Warns about orphaned imports in other files. Dry-run by default — preview the plan, then re-call with dry_run: false to apply. Destructive when applied — deletes code from source files. Use get_dead_code first to identify candidates. Returns JSON: { success, removed: { symbol_id, file }, orphanedImports }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol_id | Yes | Symbol ID to remove (from get_dead_code results) | |
| dry_run | No | Preview changes without applying (default: true). Set to false to apply. |