Skip to main content
Glama

change_signature

Add, remove, or reorder a method's parameters and update all call sites, cascading to overrides and interface implementations. Requires explicit call site values for added parameters.

Instructions

Add, remove, or reorder a method's parameters and update every call site (Roslyn's own change-signature engine). Cascades to overrides and interface implementations, rewrites named and optional arguments, and preserves an extension method's this parameter; the overrides and implementations it also rewrote are listed in CascadedTo. Operations apply in order: remove drops parameter; reorder takes order, a full permutation of the parameters surviving at that point; add appends name plus type and REQUIRES callSiteValue — the expression every existing call site will pass, since the tool never guesses call-site semantics — with an optional defaultValue that instead makes the parameter optional and leaves existing calls untouched. Rejected as unsafe: an added name that is not a valid C# identifier or collides with an existing parameter; a type that does not resolve, or resolves ambiguously (qualify it); moving or removing an extension method's this parameter (it must stay first); and any signature that would leave a surviving params array anywhere but last — add the parameter and reorder it before the params array, or remove that array. Defaults to preview mode (returns edits without writing files); set preview=false to apply. New compiler errors the change would introduce are reported as Conflicts, and apply mode refuses to write them unless force=true. Source-defined methods only; overloaded names must be disambiguated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoApply even when Conflicts are reported (default: false)
methodYesMethod to change: `MyClass.MyMethod` or fully qualified `Namespace.MyClass.MyMethod`
previewNoPreview only — return edits without writing to disk (default: true)
operationsYesParameter edits applied in order. Each has `kind` (`remove`, `reorder` or `add`) plus: `parameter` for `remove`; `order` for `reorder`; `name`, `type`, `callSiteValue` and optional `defaultValue` for `add`
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It is highly transparent, detailing side effects (cascades to overrides and interface implementations, rewrites call sites), preview vs apply mode, conflict handling with force, and limitations (source-defined methods only). It fully discloses behavioral traits.

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 relatively long but well-organized, with key actions stated upfront. Every sentence adds value, detailing operation semantics, rejected cases, and mode behavior. Minor redundancy could be trimmed, but the structure is logical and easy to parse.

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 (4 parameters, no output schema), the description is remarkably complete. It explains conflicts, the role of 'force', preview mode, source-defined methods requirement, and how operations interact. It covers edge cases like extension method preservation and params array ordering. No obvious gaps remain.

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

Parameters5/5

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

The input schema covers 100% of parameters with descriptions, but the description adds critical meaning beyond the schema. It explains that operations apply in order, that 'add' requires 'callSiteValue' (or optional 'defaultValue'), that 'reorder' expects a full permutation, and that 'remove' drops 'parameter'. It also clarifies edge cases like extension method 'this' parameter handling and params array restrictions.

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's purpose: 'Add, remove, or reorder a method's parameters and update every call site' using Roslyn's change-signature engine. It specifies the resource (a method's signature) and the exact actions. This distinguishes it from sibling tools like rename_symbol or find_references, making it unambiguous.

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 extensive guidance on when to use the tool, including detailed explanations of each operation type (add, remove, reorder) and their requirements. It also lists rejected unsafe scenarios (e.g., invalid identifiers, unresolvable types). However, it does not explicitly state when NOT to use this tool versus alternatives, such as simpler refactorings. Overall, it strongly guides proper usage.

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