Skip to main content
Glama
egn88

Refactor MCP

by egn88

Refactor MCP

A Model Context Protocol (MCP) server for automated refactoring of Java and TypeScript/JavaScript codebases. Uses OpenRewrite for Java refactoring and ts-morph for TypeScript.

Features

Java Refactoring (via OpenRewrite)

  • Rename class - Rename a class and update all references across the codebase

  • Rename method - Rename a method and update all call sites

  • Rename field - Rename a field and update all usages

  • Move class - Move class(es) to a different package and update imports

  • Add/Remove/Reorder parameters - Modify method signatures and update all call sites

  • Java Record support - Full support for modifying Java record components (adds null to call sites)

TypeScript/JavaScript Refactoring (via ts-morph)

  • Rename symbol - Rename any symbol (class, function, variable, interface, type) and update all references

  • Move symbol - Move a symbol to a different file and update all imports

  • Rename file - Rename/move a file and update all imports

  • Extract function - Extract a code block into a new function with automatic parameter detection

  • Add/Remove parameters - Modify function signatures and update all call sites

Utilities

  • Detect project type - Automatically detect Java/TypeScript projects and their build systems

Related MCP server: ast-editor

Requirements

  • Node.js 18+

  • For Java refactoring: Maven or Gradle project with OpenRewrite plugin available

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/refactor-mcp.git
cd refactor-mcp

# Install dependencies
npm install

# Build
npm run build

Configuration

Claude Code / Claude Desktop

Add to your Claude configuration file:

Claude Code (~/.claude/settings.json):

{
  "mcpServers": {
    "refactor": {
      "command": "node",
      "args": ["/path/to/refactor-mcp/build/index.js"]
    }
  }
}

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "refactor": {
      "command": "node",
      "args": ["/path/to/refactor-mcp/build/index.js"]
    }
  }
}

Java Projects

For Java refactoring to work, your project needs the OpenRewrite Maven plugin in pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>org.openrewrite.maven</groupId>
            <artifactId>rewrite-maven-plugin</artifactId>
            <version>5.44.0</version>
        </plugin>
    </plugins>
</build>

Or for Gradle, add to build.gradle:

plugins {
    id 'org.openrewrite.rewrite' version '6.25.0'
}

Usage

All tools support a dryRun parameter (default: true) that previews changes without applying them.

Java Examples

Rename a class:

Rename com.example.UserService to com.example.CustomerService

Rename a method:

Rename method getUser to fetchUser in com.example.UserService

Move classes to a new package:

Move all classes from com.example.old to com.example.new

TypeScript Examples

Rename a symbol:

Rename UserService to CustomerService in the TypeScript project

Move a symbol to a different file:

Move the UserService class from user-service.ts to services/customer-service.ts

Extract a function:

Extract lines 10-20 from utils.ts into a new function called processData

Available Tools

Tool

Description

detect_project_type

Detect project type and build system

java_rename_class

Rename a Java class

java_rename_method

Rename a Java method

java_rename_field

Rename a Java field

java_move_class

Move Java class(es) to a different package

java_add_parameter

Add a parameter to a Java method

java_remove_parameter

Remove a parameter from a Java method

java_reorder_parameters

Reorder parameters in a Java method

typescript_rename_symbol

Rename any TypeScript symbol

typescript_move_symbol

Move a symbol to a different file

typescript_rename_file

Rename/move a TypeScript file

typescript_extract_function

Extract code into a new function

typescript_add_parameter

Add a parameter to a function

typescript_remove_parameter

Remove a parameter from a function

Development

# Run in development mode
npm run dev

# Build
npm run build

# Run tests
npm test

How It Works

Java Refactoring

The server generates OpenRewrite recipe YAML files dynamically and executes them via the Maven/Gradle plugin. This ensures type-safe refactoring with proper handling of imports, references, and edge cases.

TypeScript Refactoring

Uses ts-morph to parse and manipulate the TypeScript AST directly. Changes are tracked and can be previewed as diffs before applying.

Java Records Support

Java records require special handling because they have implicit canonical constructors. When you modify a record's components, both the record declaration AND all call sites (new RecordName(...)) must be updated.

How Record Modification Works

When you use java_add_parameter, java_remove_parameter, or java_change_method_signature on a Java record (with methodName: "<init>" or the class name), the tool:

  1. Detects the record - Automatically identifies if the target class is a Java record

  2. Modifies the record declaration - Updates the record component list directly in the source file

  3. Updates all call sites - Uses OpenRewrite's AddNullMethodArgument recipe to add null to all new RecordName(...) expressions

Example: Adding a Component to a Record

// Before: public record Person(String name, int age) {}
// After:  public record Person(String name, int age, String email) {}

// All call sites are updated:
// Before: new Person("John", 30)
// After:  new Person("John", 30, null)

Important Notes for Records

  • New parameters are added as null - When adding a component, all existing call sites receive null as the new argument value. You may need to update these manually if a different default is required.

  • Use <init> or <constructor> as methodName - Both work for targeting record constructors

  • Dry run first - Always use dryRun: true to preview changes before applying

Technical Details: OpenRewrite Recipes

Understanding which OpenRewrite recipes are used helps when troubleshooting or extending the tool.

Declarations vs Call Sites

OpenRewrite has different recipes for modifying declarations (where methods/constructors are defined) vs call sites (where they are invoked):

What to Modify

Recipe

Handles

Method declaration (add param to signature)

AddMethodParameter

Declarations only

Method/constructor calls (add argument)

AddNullMethodArgument

Call sites (including new)

Method/constructor calls (add literal)

AddLiteralMethodArgument

Call sites (including new)

Method/constructor calls (remove argument)

DeleteMethodArgument

Call sites (including new)

Method/constructor calls (reorder args)

ReorderMethodArguments

Call sites (including new)

Recipe Selection by Operation

Tool Operation

Regular Methods

Java Records

Add parameter

AddMethodParameter

Record utils + AddNullMethodArgument

Remove parameter

DeleteMethodArgument

Record utils + DeleteMethodArgument

Reorder parameters

ReorderMethodArguments

Record utils + ReorderMethodArguments

Batch changes

ChangeMethodSignature composite

Record utils + UpdateCallSites composite

Method Patterns for Constructors

To target constructors in method patterns, use either:

  • com.example.MyClass <constructor>(..) - Recommended

  • com.example.MyClass <init>(..) - Also works

Both patterns match new MyClass(...) expressions when used with call-site recipes.

License

MIT

Available Tools

16 tools
detect_project_typeB

Detect Java/TypeScript project type, build system, and configuration

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the project root directory

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It says 'detect' (implying read-only) but does not explicitly confirm no side effects, nor describe what is analyzed (e.g., files examined) or what the output contains. This is insufficient for a detection tool.

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 a single sentence that is to the point, but it lacks detail. It is concise but at the expense of completeness. Still, no unnecessary words.

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?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what the detection result looks like (e.g., returns a string or structure), what 'detect' entails (e.g., scanning specific files), or how to interpret the output. A detection tool of this kind needs more context.

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% for the single parameter 'projectPath'. The description adds minimal meaning beyond the schema (e.g., 'Path to the project root directory' is already in the schema). Baseline 3 is appropriate.

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 uses specific verbs ('Detect') and resources ('Java/TypeScript project type, build system, and configuration'), clearly distinguishing it from sibling tools which are all modification operations. This tells the agent exactly what the tool does.

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?

No explicit guidance on when to use this tool versus alternatives. While sibling tools are all modifiers, implying this is a preliminary detection tool, the description does not state when to use it or mention prerequisites (e.g., run before modifications).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_add_parameterA

Add a new parameter to a Java method or record constructor and update all call sites. For Java records, use methodName "" or the class name to target the constructor - the tool auto-detects records and updates both the record declaration AND all "new RecordName(...)" call sites (adding null as the new argument value).

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the method or record
methodNameYesMethod name. For record constructors, use "<init>" or the class name (e.g., "MyRecord")
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
parameterNameYesName of the new parameter
parameterTypeYesType of the new parameter
parameterIndexNoPosition to insert parameter (0-indexed)
existingParameterTypesNoExisting parameter types to match specific overload

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must disclose all behavioral traits. It mentions auto-detection of records, updating call sites, and adding null for new arguments in records. However, it omits details on handling method overloading, constructors vs. regular methods, and potential side effects, leaving some transparency gaps.

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 two sentences with no wasted words. The first sentence states the core purpose, and the second provides critical detail on records. It is front-loaded and perfectly concise.

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 9 parameters, 5 required, no output schema, and many siblings, the description covers the main purpose, record handling, and call site updates. It lacks guidance on when to use this vs. java_change_method_signature, and does not describe return values or error states, but is largely complete.

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 coverage is 100% with detailed descriptions for all 9 parameters. The description adds value by explaining record auto-detection and call site updates, but does not significantly enhance parameter understanding beyond the schema. Baseline 3 is appropriate.

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 adds a parameter to a Java method or record constructor and updates call sites. It specifies the verb 'Add', resource 'Java method or record constructor', and distinguishes from siblings like java_remove_parameter and java_reorder_parameters.

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 implies usage for adding parameters with automatic call site updates, and gives guidance for records (use methodName '<init>' or class name). However, it does not explicitly contrast with siblings like java_change_method_signature or typescript_add_parameter, nor does it provide when-not-to-use scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_change_method_signatureA

Change a Java method or record constructor signature with multiple parameter operations (add, remove, reorder) in a single refactoring. More efficient than calling individual tools when making multiple changes. For Java records, use methodName "" or the class name - the tool auto-detects records and updates both the record declaration AND all "new RecordName(...)" call sites (adding null for new parameters).

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the method or record
methodNameYesMethod name. For record constructors, use "<init>" or the class name (e.g., "MyRecord")
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
parametersToAddNoParameters to add to the method
newParameterOrderNoFinal parameter order by name. Applied after additions and removals.
existingParameterTypesNoExisting parameter types to match specific overload
parameterIndicesToRemoveNoIndices of parameters to remove (0-indexed, from original signature). Processed before additions.

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description must fully disclose behavior. It covers record auto-detection and null insertion for new parameters, but omits error handling, side effects on callers, or requirements like project compilability. Adequate but not thorough.

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 concise, covering the main points in two sentences. It is front-loaded with the core purpose. Minor improvement could be made by structuring with bullet points for clarity, but overall efficient.

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

Completeness3/5

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

Given the tool's complexity (9 parameters, record handling, multiple operations), the description covers the main use case but lacks details on error scenarios, project prerequisites, and potential compilation impacts. It is adequate but not fully comprehensive.

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?

Since schema coverage is 100%, the baseline is 3. The description adds value by explaining the order of operations (removals before additions), record-specific methodName usage, and the purpose of multiple operations, enhancing understanding beyond the schema.

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/record constructor signatures with multiple operations, and it distinguishes itself from siblings by emphasizing efficiency over individual tools. It also specifies record handling and method naming.

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 explains when to use this tool (multiple changes) and provides record-specific usage. However, it does not explicitly state when to use individual sibling tools instead, leaving the agent to infer alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_move_classA

Move Java class(es) to a different package and update all imports using OpenRewrite

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
recursiveNoAlso move sub-packages (default: true)
newPackageYesNew package name (e.g., com.example.new)
oldPackageYesCurrent package name (e.g., com.example.old)
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root

TDQS

A3.5/5.0
Behavior3/5

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

The description mentions using OpenRewrite, implying mutation, and 'update all imports' provides some behavioral insight. However, it lacks disclosure on destructiveness, reversibility, performance, or error conditions. With no annotations, the description carries full burden but only partially fulfills it.

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?

Single sentence that is front-loaded with the core purpose and key detail (OpenRewrite). No unnecessary words, making it highly efficient.

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

Completeness3/5

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

With 6 parameters and no output schema, the description does not explain return values, error handling, or when to use dryRun vs direct application. This leaves gaps for a non-trivial refactoring tool, though schema coverage mitigates some incompleteness.

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 coverage is 100% and each parameter is well-described in the schema. The description adds no additional semantic value beyond the schema, so baseline score of 3 is appropriate.

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?

Description clearly states the action (move), resource (Java class(es)), target (different package), and side effect (update imports using OpenRewrite). This distinguishes it from siblings like 'java_rename_class' which rename the class name, not move packages.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as 'java_rename_class' or 'typescript_move_symbol'. No prerequisites or conditions for appropriate use are mentioned, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_remove_parameterA

Remove a parameter from a Java method or record constructor and update all call sites. For Java records, use methodName "" or the class name - the tool auto-detects records and updates both the record declaration AND all "new RecordName(...)" call sites.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the method or record
methodNameYesMethod name. For record constructors, use "<init>" or the class name (e.g., "MyRecord")
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
parameterIndexYesIndex of parameter to remove (0-indexed)
existingParameterTypesNoExisting parameter types to match specific overload

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses key behaviors: updating all call sites, auto-detecting records, and updating both declaration and 'new' call sites. Since no annotations are provided, the description carries the full burden; it covers important aspects but omits details on method body updates, permissions, or side effects.

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 two sentences, each earning its place: the first states the core action, the second gives specific record handling. No unnecessary words, efficient and clear.

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

Completeness3/5

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

Given the complexity of the tool (removing a parameter and updating call sites), the description lacks detail on return values or confirmation output. No output schema exists, so the description should compensate, but it does not describe what the tool returns or any summary of changes.

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?

The schema has 100% coverage, but the description adds value by explaining that methodName can be '<init>' or class name for records, and that parameterIndex is 0-indexed (though schema also states this). It provides additional context beyond the schema.

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 action 'Remove a parameter' and the scope 'from a Java method or record constructor and update all call sites.' It uses specific verbs and resources, and differentiates from sibling tools like java_add_parameter and java_reorder_parameters.

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 clear context for record constructors, instructing on methodName usage and auto-detection. However, it does not explicitly compare with other sibling tools (e.g., java_change_method_signature) or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_rename_classB

Rename a Java class and update all references using OpenRewrite

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
newFullyQualifiedNameYesNew fully qualified class name (e.g., com.example.NewClass)
oldFullyQualifiedNameYesCurrent fully qualified class name (e.g., com.example.OldClass)

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions 'update all references using OpenRewrite' but does not explain safety (e.g., preview via dryRun), error handling, or side effects like modifying multiple files. The dryRun parameter is not referenced in the description.

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 a single clear sentence with no wasted words. It is front-loaded with the purpose. However, it lacks structure (e.g., bullet points for usage hints) but remains efficient.

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?

The tool is a complex refactoring operation with no output schema and no annotations. The description omits details on return values, success/failure indicators, idempotence, and prerequisites. It is insufficient for an agent to confidently invoke the tool.

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 coverage is 100%, so the input schema already fully describes all 5 parameters. The description adds no additional meaning beyond the schema, hence baseline score of 3.

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 'Rename a Java class and update all references using OpenRewrite', specifying the verb 'rename', the resource 'Java class', and the additional action of updating references. This differentiates it from sibling tools like java_move_class or java_rename_field.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., java_move_class for moving classes, java_rename_field for renaming fields). There are no explicit context or exclusion cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_rename_fieldB

Rename a Java field and update all references using OpenRewrite

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the field
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
newFieldNameYesNew field name
oldFieldNameYesCurrent field name

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are present, so the description must carry the full burden. It mentions 'update all references using OpenRewrite' but lacks details about performance, permanent changes, project structure requirements, or failure scenarios.

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 a single sentence of 9 words, efficiently conveying the core purpose. It is appropriately front-loaded but could benefit from slightly more detail.

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

Completeness3/5

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

While the description covers the basic rename operation, it lacks details about output (no output schema), the role of the dryRun parameter, or dependencies on Maven/Gradle for OpenRewrite. It is adequate but not complete.

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 coverage is 100% with descriptions for each property. The description adds no additional parameter semantics beyond what the schema provides, so baseline 3 is appropriate.

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', the resource 'Java field', and specifies that it updates all references using OpenRewrite. This distinguishes it from sibling tools like java_rename_method or java_rename_class.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

java_rename_methodA

Rename a Java method and update all call sites using OpenRewrite

ParametersJSON 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

TDQS

A3.6/5.0
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.

java_reorder_parametersA

Reorder parameters in a Java method or record constructor and update all call sites. For Java records, use methodName "" or the class name - the tool auto-detects records and updates both the record declaration AND all "new RecordName(...)" call sites.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
classNameYesFully qualified class name containing the method or record
methodNameYesMethod name. For record constructors, use "<init>" or the class name (e.g., "MyRecord")
javaVersionNoJava version to use (e.g., "17.0.16-amzn", "21.0.8-tem")
projectPathYesPath to the Java project root
newParameterOrderYesNew order of parameter names
existingParameterTypesNoExisting parameter types to match specific overload

TDQS

A4.2/5.0
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 that the tool updates all call sites and auto-detects records, which is helpful. However, it does not mention any potential side effects, permissions, or limitations, such as whether the refactoring is reversible or if it works across files.

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 two sentences long, with the first sentence clearly stating the main purpose and the second providing specific guidance for records. There is no fluff or redundancy.

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 complexity (7 parameters, no output schema), the description is fairly complete. It covers the main use case, record-specific behavior, and the schema covers all parameters. However, it could mention that the tool works on any method, not just records, though that is implied.

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 main description adds context about record constructors and the auto-detection behavior, which is not fully captured in the schema (though the schema already mentions the methodName usage). This extra context justifies a score above baseline.

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 action ('Reorder parameters') and the resource ('Java method or record constructor'). It also distinguishes itself from sibling tools like add/remove parameters by noting that it updates all call sites, and it provides specific guidance for records, which is unique among siblings.

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 implies when to use the tool (for reordering parameters) and gives special instructions for records. However, it does not explicitly state when not to use it or mention alternative tools like java_add_parameter or java_remove_parameter for different changes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_add_parameterB

Add a new parameter to a TypeScript/JavaScript function and update all call sites

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
filePathNoOptional: specific file to search in
positionNoPosition to insert parameter (0-indexed, default: end)
defaultValueNoOptional default value for the parameter
functionNameYesName of the function/method
tsconfigPathYesPath to tsconfig.json
parameterNameYesName of the new parameter
parameterTypeYesType of the new parameter

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description must disclose risks and side effects. It mentions updating call sites but does not state that many files may be modified, nor does it highlight the dryRun default for previewing changes. Lacks details on reversibility or failure modes.

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?

A single, front-loaded sentence that efficiently conveys the core purpose. No unnecessary words.

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?

Given the complexity (8 parameters, no output schema, no annotations), the description is too sparse. It omits important context such as the need for a valid TypeScript project, the extent of file modifications, and best practices for using dryRun.

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 coverage is 100%, so the parameter descriptions are already comprehensive. The tool description adds no extra semantic value beyond the schema, meeting the baseline.

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 action: adding a parameter to a function and updating all call sites. It distinguishes from siblings like typescript_remove_parameter and typescript_change_function_signature.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like typescript_change_function_signature. The usage is implied but not clearly delineated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_change_function_signatureA

Change a TypeScript/JavaScript function signature with multiple parameter operations (add, remove) in a single refactoring. More efficient than calling individual tools when making multiple changes.

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
filePathNoOptional: specific file to search in
functionNameYesName of the function/method
tsconfigPathYesPath to tsconfig.json
parametersToAddNoParameters to add to the function
parameterNamesToRemoveNoNames of parameters to remove. Processed before additions.

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It does not mention if the operation is destructive, reversible, or requires permissions. The dryRun parameter is described in the schema but not highlighted in the description.

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 two sentences with no fluff: first states purpose, second adds value proposition. Every word is necessary.

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?

The tool has 6 parameters and nested objects, but the description does not explain the order of operations (removal before addition) or what happens on failure. No output schema exists, and return values are not mentioned. This leaves gaps for an agent.

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 all parameters have descriptions. The tool description adds no new meaning beyond the schema, but it does not need to; baseline 3 applies.

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 a function signature with multiple parameter operations (add, remove) in a single refactoring, distinguishing it from sibling tools that handle single operations. The verb 'Change' and resource 'function signature' are specific.

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 explicitly says it's more efficient than calling individual tools when making multiple changes, providing clear when-to-use guidance. However, it does not explicitly state when not to use it or list alternative tools by name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_extract_functionB

Extract a code block into a new function, automatically determining parameters and return values

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
endLineYesEnd line of the code to extract (1-indexed)
filePathYesPath to the file containing the code
startLineYesStart line of the code to extract (1-indexed)
functionNameYesName for the extracted function
tsconfigPathYesPath to tsconfig.json

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions auto-detection but does not clarify side effects (e.g., file modification, undo capability) or the dryRun default, leaving an agent uninformed about safety or irreversibility.

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?

Single sentence clearly conveys the tool's purpose without unnecessary words or repetition. It is optimally concise.

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

Completeness3/5

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

The description covers core functionality but omits details about the transformation (e.g., whether original code is replaced or whether the function is inserted at a specific location). No output schema, so return values are not explained. Adequate but not thorough.

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 coverage is 100%, so baseline is 3. The description adds only 'automatically determining parameters and return values', which is a general hint but does not explain individual parameters beyond schema descriptions.

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 extracts a code block into a new function, with automatic handling of parameters and return values. This verb-resource combination is distinctive among sibling tools like typescript_rename_symbol or typescript_add_parameter.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., typescript_change_function_signature). The description lacks context for appropriate usage scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_move_symbolA

Move a TypeScript/JavaScript symbol to a different file and update all imports

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
symbolNameYesName of the symbol to move
tsconfigPathYesPath to tsconfig.json
sourceFilePathYesCurrent file containing the symbol
targetFilePathYesTarget file to move the symbol to

TDQS

A3.7/5.0
Behavior3/5

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

The description mentions that imports are updated, which implies side effects, but does not disclose whether the source file retains the symbol, potential destructive actions, or required permissions. The dryRun parameter is described in the schema, not the description.

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, direct sentence that conveys the essential action without any unnecessary words.

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

Completeness3/5

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

For a tool that modifies multiple files, the description is minimal. It does not explain return values, handling of re-exports, or what happens to the source symbol, leaving important behavioral gaps.

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 coverage is 100%, so the description does not need to add parameter details. The description adds no parameter-specific meaning beyond the overall purpose, meeting the baseline.

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 'Move', the resource 'TypeScript/JavaScript symbol', and the outcome 'update all imports'. It distinguishes the tool from siblings like typescript_rename_symbol and typescript_extract_function.

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 implies usage for moving symbols, but does not explicitly state when to use this tool versus alternatives, nor provide any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_remove_parameterB

Remove a parameter from a TypeScript/JavaScript function and update all call sites

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
filePathNoOptional: specific file to search in
functionNameYesName of the function/method
tsconfigPathYesPath to tsconfig.json
parameterNameYesName of the parameter to remove

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions updating all call sites, but lacks details on handling of function body usage, optional parameters, or revertibility. Minimal behavioral context.

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?

A single sentence that is concise and front-loaded with the core purpose. No unnecessary words.

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?

No output schema is provided, and the description does not explain return values or output format. Given the complexity of a code modification tool and 5 parameters, more completeness is needed.

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 descriptions cover all 5 parameters (100% coverage). The description adds no extra meaning beyond the schema, so baseline score of 3 is appropriate.

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 action 'remove a parameter' and the resource 'TypeScript/JavaScript function and update all call sites'. It is specific and distinguishes from sibling tools like typescript_add_parameter or typescript_change_function_signature.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives, nor any prerequisites or exclusions. The description only states what it does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_rename_fileB

Rename or move a TypeScript/JavaScript file and update all imports

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
newFilePathYesNew file path
oldFilePathYesCurrent file path
tsconfigPathYesPath to tsconfig.json

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits. It states it updates imports but does not mention that it modifies files on disk, whether changes are reversible, or if it requires specific permissions or project configurations beyond a tsconfig.

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 self-contained sentence with no wasted words. It conveys the essential purpose efficiently.

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

Completeness3/5

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

Given the tool's complexity (file rename with import updates, 4 parameters, no output schema), the description is minimally adequate. It explains the core function but lacks details on side effects, expected output, and coordination with other tools.

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?

All parameters have descriptions in the schema (100% coverage), so the baseline is 3. The description adds no additional meaning about parameters beyond the overall purpose, so no bonus.

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 or move') and the resource ('TypeScript/JavaScript file'), and specifies the key effect ('update all imports'). This distinguishes it from sibling tools like typescript_rename_symbol (symbol-level) and Java tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., typescript_rename_symbol for renaming a symbol, or manual file renaming). There is no mention of prerequisites, workflow context, or cases where this should be avoided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

typescript_rename_symbolB

Rename any TypeScript/JavaScript symbol (class, function, variable, interface, type) and update all references

ParametersJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview changes without applying (default: true)
newNameYesNew name for the symbol
filePathNoOptional: specific file to search in
symbolNameYesCurrent name of the symbol to rename
tsconfigPathYesPath to tsconfig.json

TDQS

B3.1/5.0
Behavior2/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 mentions updating references but does not disclose potential side effects, whether changes are reversible, or that the tool defaults to a dry run (as per schema). The description lacks transparency about the operation's safety.

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 a single sentence that efficiently states the core purpose. It is front-loaded with the verb and resource. However, it could include a brief note about the dry run behavior without being verbose.

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?

Given the complexity of renaming symbols with reference updates, the description is incomplete. It does not mention that the tool requires a valid tsconfig, that it is a refactoring operation, or that it might affect many files. The lack of output schema means return values are not described, but that is not required.

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 baseline is 3. The description adds no additional meaning beyond the schema's parameter descriptions. It does not explain parameter relationships or usage hints.

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' and the resource 'any TypeScript/JavaScript symbol (class, function, variable, interface, type)'. It also mentions updating all references, which is specific. It distinguishes from siblings like 'typescript_move_symbol' which moves symbols rather than renaming.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'typescript_move_symbol' or other rename tools in the sibling list. It does not specify prerequisites (e.g., tsconfig must exist) or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 16 tool updatesv1.0.0
    • First observeddetect_project_type
    • First observedjava_add_parameter
    • First observedjava_change_method_signature
    • First observedjava_move_class
    • First observedjava_remove_parameter
    • First observedjava_rename_class
    • First observedjava_rename_field
    • First observedjava_rename_method
    • First observedjava_reorder_parameters
    • First observedtypescript_add_parameter
    • First observedtypescript_change_function_signature
    • First observedtypescript_extract_function
    • First observedtypescript_move_symbol
    • First observedtypescript_remove_parameter
    • First observedtypescript_rename_file
    • First observedtypescript_rename_symbol

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a specific language (Java or TypeScript) and a distinct refactoring operation, with no overlap between them. The language prefix and descriptive operation names make it easy for an agent to select the correct tool.

Naming Consistency5/5

All tools follow a consistent 'language_verb_noun' pattern using snake_case (e.g., java_add_parameter, typescript_rename_symbol). The naming is uniform and predictable across all 16 tools.

Tool Count5/5

With 16 tools covering two languages and a balanced set of common refactorings (add/remove/reorder parameters, rename, move, extract), the count is well-scoped for a refactoring server. It feels neither sparse nor overwhelming.

Completeness4/5

The tool set covers essential refactorings for both Java and TypeScript, including parameter manipulation, renaming, moving, and extraction. However, it lacks some common operations like extract variable, inline, or change return type, which are minor gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    A robust, language-agnostic Model Context Protocol (MCP) server that provides AI coding agents with the ability to edit files surgically via Abstract Syntax Trees (AST) instead of relying on token-heavy, brittle search-and-replace or diff operations.
    28
    8
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A stateful, AST-aware MCP server for structured code review workflows. It enables iterative review sessions with AST-based context localization and provides structured feedback with verdicts and patch suggestions for JavaScript/TypeScript code.
    1
    GPL 3.0
  • A
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server that provides 40 tools for TypeScript/JavaScript refactoring and code intelligence, directly mapping to TypeScript's tsserver protocol commands for accurate structural changes and workspace analysis.
    40
    34
    3
    MIT

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