rename_symbol

[refactoring]

Applies TypeScript language-service rename edits for a symbol after computing the plan.

Why this tool exists

JS/TS renames should follow language-service identity rather than search-and-replace text.

How it helps the agent

The model can preview or apply semantic rename plans with affected files and diagnostics evidence.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
symbolKeystringYesStable symbol key returned by a prior symbol discovery tool.
newNamestringYesNew symbol name.
scopestringNoRename scope: 'same-project', 'direct-dependents', or 'transitive-dependents'.
allowPartialbooleanNoAllow applying a partial rename when some projects cannot be resolved safely.

Examples

Apply a semantic rename

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "rename_symbol",
    "arguments": {
      "symbolKey": "role=canonical|...",
      "newName": "AccountService"
    }
  }
}

Response Notes

Returns applied files, occurrence counts, skipped projects, and post-apply diagnostics.

↑/↓ NavigateEnter OpenSpace Expand