Skip to main content
Glama
egn88

Refactor MCP

by egn88

java_rename_method

Rename a Java method across your project by specifying the class and method names. Uses OpenRewrite to update all call sites automatically, with an optional dry run to preview changes.

Instructions

Rename a Java method and update all call sites using OpenRewrite

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the method
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
newMethodNameYesNew method name
oldMethodNameYesCurrent method name
parameterTypesNoOptional: parameter types to match specific overload
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the key behavior—renaming and updating call sites—but omits safety considerations (e.g., whether changes are reversible), error handling, or side effects. It is minimal but not misleading.

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 a single sentence that front-loads the purpose. It contains zero wasted words while conveying the core action and technology.

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

Completeness2/5

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

Despite having 7 parameters (4 required), the description is too brief. It does not explain the workflow, the role of dryRun, or how call sites are updated. Without an output schema, the agent needs more context to invoke the tool correctly and interpret results.

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?

100% schema coverage means the schema already describes each parameter adequately. The description adds no extra meaning beyond what the schema provides, so it meets the baseline of 3 without further clarification.

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), resource (Java method), and outcome (update all call sites) using OpenRewrite. This distinguishes it from siblings like java_change_method_signature or java_rename_class, which handle different refactoring tasks.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives. It lacks guidance on prerequisites, when not to use it, or the distinction from signature-changing tools. The mention of OpenRewrite implies a refactoring context but does not provide comparative usage cues.

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/egn88/refactor-mcp'

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