Skip to main content
Glama

Plan JS/TS to Java migration

migrate_plan
Idempotent

Generate a Java migration plan from JavaScript or TypeScript code, including work units, dependency-ordered waves, risks, starter decisions, and a vocabulary seed.

Instructions

Build a java-anything migration plan for a JS/TS file or project: units, dependency-ordered waves, risks, numbered starter decisions and a vocabulary seed. Inspiration: rust-anything (MIT).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "migrate_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoInline source to plan instead of reading a path
nameNoProject name used in the plan (default: directory name)
pathNoJavaScript/TypeScript file or project directory inside an allowed root
file_nameNoVirtual file name for inline code, e.g. app.tsx (default input.js)
max_filesNoMaximum files to analyze for a directory (default 500)
report_pathNoOptional .md file path to receive the full migration plan markdown (must end with .md, not a directory)

Output Schema

NameRequiredDescriptionDefault
errorNo
messageNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the safety profile is largely covered. The description adds real behavioral value by naming the plan's sections, but it omits the side effect it clearly has: writing markdown to report_path when supplied. That write is the main thing an agent would want disclosed beyond the annotations.

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?

One front-loaded sentence with a compact output list and no filler. The trailing 'Inspiration: rust-anything (MIT)' is attribution rather than decision-relevant content and is the only expendable fragment.

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?

An output schema exists, so return values need no explanation, and annotations cover safety. However, with six all-optional parameters, the description never says that at least one of code or path is effectively required, nor how the two interact, which is the largest ambiguity for correct invocation.

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 six parameters (code, path, name, file_name, max_files, report_path) are already documented in the schema, including defaults and the .md constraint. The description adds no parameter-level meaning such as the code-vs-path precedence or what the 500-file default means for runtime. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and artifact ('Build a ... migration plan') plus the exact resource scope (JS/TS file or project) and enumerates the outputs (units, dependency-ordered waves, risks, numbered starter decisions, vocabulary seed). An agent can tell this is the planning tool rather than an analysis or gate tool, though it never names the sibling tools it differs from (migrate_gate, migrate_report, analyze_javascript).

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?

Usage is only implied by the scope phrase 'for a JS/TS file or project'. There is no explicit when-to-use versus analyze_javascript, migrate_gate, or migrate_report, and no stated prerequisite that the path must sit inside an allowed root or that code and path are alternatives. The agent must infer the entry conditions.

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