Skip to main content
Glama
RuoJi6

Java Decompiler MCP Server

by RuoJi6

decompile_file

Decompile Java .class or .jar files into readable source code using CFR decompiler, with options to save output directly to file system or return content.

Instructions

反编译单个 .class 或 .jar 文件

Args:
    file_path: 要反编译的文件路径(.class 或 .jar)
    output_dir: 输出目录,默认为文件所在目录下的 decompiled 文件夹
    save_to_file: 是否直接保存到文件系统(推荐),默认为 True。设为 False 时会返回反编译内容

Returns:
    反编译结果信息或内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
output_dirNo
save_to_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 that the tool can save output to a file system or return content, and mentions a default output directory. However, it lacks details on permissions needed, error handling, rate limits, or what '反编译结果信息或内容' (decompiled result info or content) entails. This provides basic behavioral context but is incomplete for a tool that performs file operations.

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 well-structured and concise, with a clear purpose statement followed by Args and Returns sections. Each sentence adds value: the purpose, parameter explanations, and return note. It could be slightly more front-loaded by emphasizing the single-file focus earlier, but overall it's efficient with minimal waste.

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 no annotations, 3 parameters with 0% schema coverage, and an output schema present (which handles return values), the description is moderately complete. It covers the tool's purpose and parameters adequately but lacks behavioral details like error cases or dependencies (e.g., on tools like 'get_java_version'). For a decompilation tool, more context on limitations or prerequisites would be helpful.

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 0%, so the description must compensate. It adds meaningful semantics for all three parameters: 'file_path' as the path to decompile, 'output_dir' with default behavior, and 'save_to_file' with implications for output handling. This goes beyond the schema's basic types and titles, providing practical usage context. However, it doesn't specify file path formats or constraints.

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?

The description clearly states the tool's purpose: '反编译单个 .class 或 .jar 文件' (decompile a single .class or .jar file). It specifies the verb (decompile) and resource (file), but doesn't explicitly differentiate from sibling tools like 'decompile_directory' or 'decompile_files' beyond the '单个' (single) qualifier. This makes it clear but lacks explicit sibling differentiation.

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. It mentions 'save_to_file: 是否直接保存到文件系统(推荐),默认为 True。设为 False 时会返回反编译内容' (whether to save to file system (recommended), default True. Set to False to return decompiled content), which is a parameter usage hint but not a tool selection guideline. There's no mention of when to choose this over 'decompile_directory' or 'decompile_files' from the sibling list.

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/RuoJi6/java-decompile-mcp'

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