Skip to main content
Glama

rename_symbol

Safely rename a type or member across the entire solution, cascading to references, constructors, overrides, and documentation. Preview changes before applying, with automatic conflict detection to avoid new compiler errors.

Instructions

Safely rename a type or member across the entire solution (Roslyn Renamer). Cascades to references, constructors, overrides, nameof, and XML doc crefs. Defaults to preview mode (returns edits without writing files); set preview=false to apply. New compiler errors the rename would introduce are reported as Conflicts, and apply mode refuses to write them unless force=true. Locals/parameters and file renames are not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoApply even when Conflicts are reported (default: false)
symbolYesSymbol to rename: simple type (MyClass), fully qualified (Namespace.MyClass), or member (MyClass.MyMethod)
newNameYesNew name — a bare C# identifier, e.g. 'OrderProcessor'
previewNoPreview only — return edits without writing to disk (default: true)
renameInStringsNoAlso rewrite occurrences inside string literals (default: false)
renameOverloadsNoRename all overloads of a method together (default: true; false renames a single arbitrary overload)
renameInCommentsNoAlso rewrite occurrences inside comments (default: true)
Behavior5/5

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

No annotations provided, so the description fully carries the burden. It details preview mode vs apply, conflict reporting, force flag, cascading to references/constructors/overrides/nameof/XML doc crefs, and unsupported features. This is comprehensive and transparent.

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

Conciseness5/5

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

The description is concise (three sentences) and front-loaded with the main purpose. Every sentence adds value without redundancy.

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?

Given the complexity (7 parameters, no output schema), the description covers all essential aspects: what it renames, preview vs apply, conflict handling, force, and limitations. It is complete enough for an agent to use correctly.

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 description coverage is 100%, so baseline is 3. The description adds value by explaining the interplay between preview, conflicts, and force, and clarifying what 'Conflicts' means. This extra context justifies a 4.

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?

The description clearly states the tool renames types or members across the entire solution using Roslyn Renamer. It specifies the verb 'rename' and the resources 'type or member', and distinguishes itself from siblings like change_signature by focusing on renaming rather than signature changes.

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

Usage Guidelines4/5

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

The description provides clear guidance: defaults to preview mode, explains how to apply, and explicitly states unsupported cases (locals/parameters, file renames). However, it does not explicitly compare to sibling tools like find_references or change_signature, but the behavior is well-defined.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarcelRoozekrans/roslyn-codelens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server