rename_symbol
Rename a symbol and all its references using a symbol graph, previewing changes first. Scans both graph-confirmed and textual-only sites to catch missed references.
Instructions
Preview-first, graph-driven rename of a symbol and its references (codehelper's heuristic answer to an LSP rename — no language server, no go/types). Resolves the definition via the symbol graph, collects graph-confirmed reference sites, and ALSO runs a word-boundary textual scan to catch references the graph missed, classifying every site as graph-confirmed (high confidence) or textual-only (unverified — may be a same-named field, comment, or string). Returns a per-file plan by default; pass apply=true to write graph-confirmed sites (and include_textual=true to also write textual-only ones). Not type-aware: review before applying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | New name | |
| line | No | Definition start line to disambiguate | |
| name | Yes | Current symbol name (or sym: id) to rename | |
| path | No | Definition file (relative to repo root) to disambiguate when several symbols share the name | |
| repo | No | Repository name (optional; defaults to current MCP workspace) | |
| apply | No | Write the edits (default false — preview only) | |
| format | No | Response text encoding: toon (default) | json | |
| include_textual | No | When applying, also write textual-only (unverified) sites. Default false. |