Skip to main content
Glama

change_method_signature

Change a method's signature (name, return type, or parameters) and generate text edits to update all call sites automatically.

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.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explains that the tool returns text edits for declaration and call sites, and the caller applies them. It also notes zero-based coordinates and required load_project. More detail on error handling or side effects would improve it.

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 structured with clear sections (USAGE, OUTPUT, PARAMETER OPERATIONS, IMPORTANT) and each sentence contributes valuable information. It is slightly verbose but well-organized.

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 no output schema, the description adequately explains the output is text edits and mentions prerequisites. It covers the main behavioral aspects, though details on edit format or error conditions would enhance completeness.

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 description adds significant value beyond the input schema by detailing parameter operations (add with default, remove, rename, reorder) and clarifying the use of zero-based coordinates. Schema coverage is 100%, but the description enriches understanding.

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 changes method signature (parameters, return type, or name) and updates call sites. This verb+resource combination distinguishes it from siblings like rename_symbol or inline_method.

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 usage guidance ('Position on method declaration, provide changes') and prerequisites ('Requires load_project to be called first'). It does not explicitly contrast with alternatives, but the context is sufficient for the agent.

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