Skip to main content
Glama

change_method_signature

Modify a method's parameters, return type, or name and automatically update all call sites with text edits.

Instructions

Change method signature (parameters, return type, or name) and update all call sites.

Returns text edits for the method declaration and all call sites. The caller should apply these edits to perform the change.

USAGE: Position on method declaration, provide changes OUTPUT: Edits for declaration and all call sites

PARAMETER OPERATIONS:

  • Add new parameter with default value for existing calls

  • Remove parameter (will remove from calls)

  • Rename parameter

  • Reorder parameters (specify all parameters in new order)

IMPORTANT: Uses ZERO-BASED coordinates.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to source file containing the method
lineYesZero-based line number of method declaration
columnYesZero-based column number
newNameNoNew method name (optional, omit to keep current)
newReturnTypeNoNew return type (optional, omit to keep current)
newParametersNoNew parameter list. Each item: {name, type, defaultValue?}. Order matters.
Behavior3/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 explains that the tool returns text edits for declaration and all call sites and that the caller should apply them. It mentions zero-based coordinates. However, it lacks explicit disclosure that this is a mutation operation (changing source files) and does not warn about reversibility or side effects, leaving some behavioral ambiguity.

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 well-structured with clear sections: purpose, usage, output, parameter operations, and an important note. Every sentence is purposeful and concise, with no unnecessary words.

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 absence of an output schema, the description adequately explains the return value (edits for declaration and all call sites). It also covers prerequisites (load_project), usage, and parameter details. The description is complete for a refactoring tool of this complexity.

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 significant value by explaining parameter operations (add, remove, rename, reorder) and the use of 'defaultValue' for new parameters. It also highlights zero-based coordinates, going beyond the schema's basic definitions.

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 'Change method signature (parameters, return type, or name) and update all call sites.' It uses a specific verb (change) and resource (method signature), and distinguishes this from sibling tools like rename_symbol or refactoring tools that only affect one aspect.

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 explicit usage guidance: 'USAGE: Position on method declaration, provide changes' and 'Requires load_project to be called first.' It lists parameter operations but does not explicitly state when not to use or suggest alternative tools, which would have made it a 5.

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/javalens-mcp'

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