Skip to main content
Glama
sapyyy

Java JAR Decompiler & Reverse Engineering MCP Server

by sapyyy

generate_ast_and_detect_obfuscation

Generate ASTs from Java source to detect obfuscated and synthetic variable names such as var0, arg1, and single-letter identifiers.

Instructions

Uses GumTree Spoon AST Diff to parse Java source files, generate AST representations, and detect obfuscated or synthetic variable names (e.g., var0, arg1, single-letter, closure captures).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logPathNoPath to output the obfuscation detection report. Defaults to logs/ast_obfuscation_detection.txt.
sourceDirNoPath to the Java source directory to analyze. Defaults to mavenized_merged_source/src/main/java.
gumtreeJarPathNoPath to the GumTree Spoon AST Diff JAR. Defaults to gumtree-ast-diff/gumtree-spoon-ast-diff-1.124.jar.
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It does not disclose that a report is written to logPath, whether the tool is read-only, or what the output format is. The mention of generating ASTs is vague about 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?

A single, information-dense sentence with no filler. It front-loads the key action and gives specific examples, earning its place without redundancy.

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?

With no output schema and no annotations, the description should explain return values and side effects. It does not mention that the tool produces a report file (logPath), nor does it integrate with the pipeline context of sibling tools, leaving significant 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 coverage is 100%, so the baseline is 3. The description adds context for gumtreeJarPath by naming GumTree Spoon AST Diff, but does not explain logPath behavior beyond the schema. It provides marginal added value.

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 parses Java source files, generates ASTs, and detects obfuscated variable names with concrete examples. This distinguishes it from siblings like rename_obfuscated_variables and run_ast_deobfuscation_pipeline.

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 purpose implies when to use (for detecting obfuscation in Java sources), but it lacks explicit guidance on when to use this tool versus alternatives like analyze_decompilation_output or compare_bytecode_and_analyze. No exclusions or preferred order is given.

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/sapyyy/reverse-engineering-mcp-server'

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