Skip to content

code_rename_symbol

code_rename_symbol finds every definition, call site, import, and type reference for a symbol so you know exactly what a rename will touch — before making any changes. Always run in dry-run mode first.

code_rename_symbol(old_name="processUser", new_name="handleUser", dry_run=true)
ParameterTypeDefaultDescription
old_namestringrequiredCurrent symbol name
new_namestringrequiredDesired new name
dry_runbooleantruePreview changes without writing files
Rename: processUser → handleUser
Locations to update (7):
src/services/user.ts:44 definition
src/controllers/user.ts:31 call site
src/controllers/admin.ts:88 call site
src/middleware/auth.ts:22 call site
src/types/user.d.ts:12 type reference
tests/user.test.ts:14 call site
tests/integration/user.test.ts:9 call site
# Step 1: preview (always)
code_rename_symbol(old_name="processUser", new_name="handleUser", dry_run=true)
# Step 2: review each location
code_get(name="processUser")
# Step 3: make the change, then verify
code_build()
  • Before any rename to understand the full blast radius
  • When a function has spread across many files and you are unsure of all usages
  • As a safety check before automated refactoring