Skip to main content
Glama

change_method_signature

Modify Java method signatures (name, parameters, return type) and automatically update all call sites with required 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.
Behavior4/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 discloses key behavioral traits: the tool returns 'text edits' that 'the caller should apply,' uses 'ZERO-BASED coordinates,' and has a prerequisite ('Requires load_project'). It also details parameter operations (add, remove, rename, reorder), which helps understand the mutation behavior. However, it doesn't mention error handling, permissions, or rate limits.

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 and front-loaded, with key information first ('Change method signature...'). Each section (USAGE, OUTPUT, PARAMETER OPERATIONS, IMPORTANT, prerequisite) is concise and earns its place, avoiding redundancy. No sentences are wasted.

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 tool's complexity (mutation with 6 params, no annotations, no output schema), the description is mostly complete. It covers purpose, usage, output format, parameter operations, coordinate system, and prerequisites. However, it lacks details on error cases or the exact format of returned edits, which could be helpful for a tool with no output schema.

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 already documents all 6 parameters thoroughly. The description adds some context by mentioning 'ZERO-BASED coordinates' (relevant to line/column params) and detailing parameter operations (e.g., 'Add new parameter with default value'), but this mostly reinforces schema info without significant new semantics. Baseline 3 is appropriate given high schema coverage.

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: 'Change method signature (parameters, return type, or name) and update all call sites.' It specifies the verb ('Change'), resource ('method signature'), and scope ('update all call sites'), distinguishing it from sibling tools like rename_symbol (which might only rename) or extract_method (which creates new methods).

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'Position on method declaration, provide changes' and 'Requires load_project to be called first.' It also distinguishes this tool from alternatives by specifying what it does (updates call sites) and includes a prerequisite, making it clear when and how to use it.

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