Rename Symbol
rename-symbol · Mutation · CorePlugin · Code mutation
Stages a symbol rename across the effective solution.
Availability: Published in transactional, approval-required and autonomous-trusted operational modes.
Generated from Roslyn Workbench MCP 1.1.0 (1.1.0).
Behaviour annotations
| Annotation | Value |
|---|---|
destructiveHint |
true |
idempotentHint |
false |
openWorldHint |
false |
readOnlyHint |
false |
title |
"Rename Symbol" |
Request
| Property | Type | Required | Description |
|---|---|---|---|
symbol |
object |
Yes | The symbol selector. |
newName |
string |
Yes | The new symbol name. |
renameOverloads |
boolean |
No | Whether overloads should also be renamed. |
renameInStrings |
boolean |
No | Whether matching identifiers in string literals should also be renamed. |
renameInComments |
boolean |
No | Whether matching identifiers in comments should also be renamed. |
renameFile |
boolean |
No | Whether the containing file should be renamed for type symbols. |
expectedSnapshot |
object |
Yes | Echo the snapshot returned with the data or transaction state used to construct this request. |
workspace |
object | null |
No | Provide workspaceId, alias, path, or any combination. |
Response
Success response
| Property | Type | Required | Description |
|---|---|---|---|
ok |
boolean constant (true) |
Yes | Whether the tool invocation succeeded. |
data |
object |
Yes | Tool-specific result payload. |
snapshot |
object |
Yes | Exact immutable workspace snapshot associated with the result, when available. |
warnings |
array |
No | Non-fatal warnings the agent should consider. |
Error response
| Property | Type | Required | Description |
|---|---|---|---|
ok |
boolean constant (false) |
Yes | Whether the tool invocation succeeded. |
error |
object |
Yes | Structured error details when the invocation failed. |
continuation |
oneOf |
No | Action the agent should take before retrying or continuing. |
diagnostics |
array |
No | Diagnostics that explain the failed invocation. |
warnings |
array |
No | Non-fatal warnings the agent should consider. |
Error response
| Property | Type | Required | Description |
|---|---|---|---|
ok |
boolean constant (false) |
Yes | Whether the tool invocation succeeded. |
error |
object |
Yes | Structured error details when the invocation failed. |
diagnostics |
object |
Yes | Diagnostics that explain the failed invocation. |
reporting |
object |
No | Error-reporting workflow available for an unhandled failure. |
Continuations and required actions
A response may include a structured continuation at the following schema location. Follow its tool call or user-action instruction instead of guessing how to continue:
$/oneOf/1/properties/continuation
Examples
Stage the source change
Workflow: Review an exact change for one-use approval, step 2.
Operational modes: approval-required.
Stage one coherent mutation before producing its exact-change receipt.
Expected outcome: The rename advances the active transaction revision without writing source files.
{
"symbol": {
"documentationCommentId": "T:Sample.Widget"
},
"newName": "RenamedWidget",
"expectedSnapshot": {
"workspaceId": "11111111-1111-1111-1111-111111111111",
"workspaceEpoch": 1,
"snapshotId": "22222222-2222-2222-2222-222222222222",
"transactionRevision": 0
},
"workspace": {
"alias": "sample"
}
}
Complete input schema
{
"type": "object",
"properties": {
"symbol": {
"description": "The symbol selector.",
"type": "object",
"properties": {
"project": {
"description": "Disambiguates symbols with matching identities.",
"type": [
"object",
"null"
],
"properties": {
"projectId": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"description": "Workspace-relative path.",
"type": "string"
},
"targetFramework": {
"type": "string"
}
}
},
"location": {
"description": "Provide exactly one of span or selection.",
"type": "object",
"properties": {
"span": {
"type": "object",
"properties": {
"document": {
"description": "Provide exactly one of path or documentId.",
"type": "object",
"properties": {
"project": {
"description": "Disambiguates documents with matching paths or IDs.",
"type": [
"object",
"null"
],
"properties": {
"projectId": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"description": "Workspace-relative path.",
"type": "string"
},
"targetFramework": {
"type": "string"
}
}
},
"path": {
"description": "Workspace-relative path.",
"type": "string"
},