roslyn:rename_symbol
Renames a symbol (type, method, property, etc.) across the entire .NET solution using Roslyn semantic analysis to update all references. Preview changes before applying with adjustable verbosity and file limits.
Instructions
Safely rename a symbol (type, method, property, etc.) across the entire solution. Uses Roslyn's semantic analysis to ensure all references are updated. SUPPORTS PREVIEW MODE - always preview first! IMPORTANT: Uses ZERO-BASED coordinates. Default shows first 20 files with summary verbosity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>",
"line": "<line>",
"column": "<column>",
"newName": "<newName>"
},
"name": "roslyn:rename_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Zero-based line number (editor line - 1) | |
| column | Yes | Zero-based column number (editor column - 1) | |
| newName | Yes | New name for the symbol | |
| preview | No | Preview changes without applying (default: true). ALWAYS preview first! | |
| filePath | Yes | Absolute path to source file containing the symbol | |
| maxFiles | No | Max files to show in preview (default: 20, prevents large outputs) | |
| verbosity | No | Output detail level: 'summary' (default, file paths + counts only ~200 tokens/file), 'compact' (add locations ~500 tokens/file), 'full' (include old/new text ~3000+ tokens/file) |