Skip to main content
Glama
RuoJi6

Java Decompiler MCP Server

by RuoJi6

decompile_file

Convert Java .class or .jar files back into readable source code using CFR decompiler. Supports single-file decompilation with configurable output options.

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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's behavior regarding output handling (saving to file system vs returning content) and default behavior, but doesn't mention potential side effects, error conditions, performance characteristics, or security implications of decompilation.

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 with clear sections (purpose, Args, Returns) and uses efficient language. However, the Chinese-to-English translation creates some minor awkwardness, and the '推荐' (recommended) note in the save_to_file parameter could be more 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 the tool's moderate complexity (decompilation operation), no annotations, and the presence of an output schema (which handles return values), the description provides good coverage. It explains the core functionality, parameters, and output behavior adequately, though additional context about decompilation limitations or requirements would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description provides comprehensive semantic information for all 3 parameters: 'file_path' specifies acceptable file types (.class or .jar), 'output_dir' explains the default behavior, and 'save_to_file' clarifies the trade-off between file output and direct return. This fully compensates for the lack of 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 specific action ('反编译' - decompile) and the target resources ('.class 或 .jar 文件'), distinguishing it from siblings like 'decompile_directory' and 'decompile_files' which handle multiple files or directories. The verb+resource combination is precise and unambiguous.

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 when to use this tool (for single files) versus alternatives like 'decompile_directory' for directories, but doesn't explicitly state when NOT to use it or compare with all siblings like 'decompile_files'. The guidance is helpful but not exhaustive regarding alternatives.

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-decompiler-mcp'

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