Rename Symbol
rename-symbolStages a Roslyn symbol rename and reference updates in the current transaction; preview, then commit or roll back. Requires an active transaction, symbol, new name, and expected snapshot.
Instructions
Stages a Roslyn symbol rename and reference updates across the current transaction solution. Use this for a resolved symbol rename; use code-action discovery for provider-specific transformations. Requires an active transaction, symbol, newName and the current expectedSnapshot. renameOverloads, renameInStrings, renameInComments and renameFile all default to false; renameFile asks Roslyn to rename the containing file for type symbols and stages the resulting path change. An unchanged name produces no change. Successful staging returns mutation details and a new snapshot for subsequent requests. Inspect transaction-preview, or transaction-review in approval-required mode, then commit or roll back promptly. Source files are written only by transaction-commit; this tool does not create a Git commit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | The symbol selector. | |
| newName | Yes | The new symbol name. | |
| workspace | No | Provide workspaceId, alias, path, or any combination. | |
| renameFile | No | Whether the containing file should be renamed for type symbols. | |
| renameInStrings | No | Whether matching identifiers in string literals should also be renamed. | |
| renameOverloads | No | Whether overloads should also be renamed. | |
| expectedSnapshot | Yes | Echo the snapshot returned with the data or transaction state used to construct this request. | |
| renameInComments | No | Whether matching identifiers in comments should also be renamed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||