Skip to main content
Glama

roslyn:rename_symbol

Safely rename C# symbols across your entire solution using Roslyn's semantic analysis to update all references. Preview changes before applying them to ensure accuracy.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to source file containing the symbol
lineYesZero-based line number (editor line - 1)
columnYesZero-based column number (editor column - 1)
newNameYesNew name for the symbol
previewNoPreview changes without applying (default: true). ALWAYS preview first!
maxFilesNoMax files to show in preview (default: 20, prevents large outputs)
verbosityNoOutput 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)
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: safety ('safely rename'), scope ('across the entire solution'), analysis method ('Roslyn's semantic analysis'), preview mode support, zero-based coordinates, and default output limits. It lacks details on error handling or performance implications, but covers essential operational context.

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?

The description is appropriately sized with three sentences that are front-loaded with core functionality. It efficiently covers purpose, safety, and key usage notes without redundancy, though the capitalization and exclamation marks slightly affect readability.

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

Completeness4/5

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

Given the complexity of a refactoring tool with 7 parameters and no output schema, the description is mostly complete. It explains the tool's behavior, safety, and usage guidelines well, but lacks details on return values or error cases, which would be helpful for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all 7 parameters. The description adds minimal value beyond the schema, only reiterating preview mode importance and zero-based coordinates, which are already in the schema descriptions. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb ('rename') and resource ('symbol') with specificity about scope ('across the entire solution') and method ('Uses Roslyn's semantic analysis'). It distinguishes from siblings like 'find_references' or 'change_signature' by emphasizing the refactoring action with safety guarantees.

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 context with 'SUPPORTS PREVIEW MODE - always preview first!' and 'Default shows first 20 files with summary verbosity,' guiding when to use it. However, it does not explicitly mention when not to use it or name alternatives among the many sibling tools.

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/pzalutski-pixel/sharplens-mcp'

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