Skip to main content
Glama

Rename Symbol

rename-symbol
Destructive

Stages 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

NameRequiredDescriptionDefault
symbolYesThe symbol selector.
newNameYesThe new symbol name.
workspaceNoProvide workspaceId, alias, path, or any combination.
renameFileNoWhether the containing file should be renamed for type symbols.
renameInStringsNoWhether matching identifiers in string literals should also be renamed.
renameOverloadsNoWhether overloads should also be renamed.
expectedSnapshotYesEcho the snapshot returned with the data or transaction state used to construct this request.
renameInCommentsNoWhether matching identifiers in comments should also be renamed.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.6

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it explains that changes are merely staged, that source files are written only by transaction-commit, that this tool creates no Git commit, that an unchanged name produces no change, and that success returns mutation details plus a new snapshot. The 'staged, not applied' semantics are the single most important thing an agent needs here and they are stated plainly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the sibling distinction before prerequisites and behavior. It is dense — several clauses per sentence — but essentially every clause carries actionable information (defaults, workflow, no-commit guarantee). A minor trim would make it crisper.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent, nested-schema mutation with 8 parameters, the description covers purpose, prerequisites, safe workflow, flag defaults, return shape, and the blast-radius boundary. With an output schema present it correctly does not re-explain return values, only that a new snapshot is returned for subsequent requests.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real value the schema lacks: the default (false) for renameOverloads, renameInStrings, renameInComments and renameFile, and the specific behavior of renameFile as requesting Roslyn to rename the containing file for type symbols and staging the resulting path change. expectedSnapshot is also characterized as 'the current' snapshot.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Stages a Roslyn symbol rename and reference updates' — and immediately scopes it against 'code-action discovery for provider-specific transformations'. An agent can distinguish this from stage-code-action and resolve-symbol without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit about selection ('use this for a resolved symbol rename; use code-action discovery for provider-specific transformations') and about prerequisites ('Requires an active transaction, symbol, newName and the current expectedSnapshot'). It also states the mandatory follow-up workflow: inspect transaction-preview/transaction-review, then commit or roll back promptly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.