Skip to main content
Glama

dex_to_smali

Decompile DEX files to Smali for Android reverse engineering. Accepts a single .dex or a directory of unpacked DEX files and writes Smali to an output directory.

Instructions

把 dex 反编译为 smali。dexInput 可为单个 .dex 文件或包含多个 dex 的目录(如脱壳输出目录)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outDirNosmali 输出目录,默认 <out>/smali
dexInputYes.dex 文件或含 dex 的目录

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It says nothing about whether existing output is overwritten, whether the write requires particular permissions, or what the result of a large multi-dex directory looks like, so an agent cannot predict 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the core purpose front-loaded and no wasted filler. It is compact, though the second sentence is largely a restatement of the schema's dexInput description.

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 simple two-parameter decompilation tool with full schema coverage and no output schema, the description is minimally adequate. It stays silent on output behavior and side effects, which matters more here because no annotations compensate.

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 both parameters are already documented there, and the description only restates that dexInput accepts a file or a directory. The added 'unpacking output directory' example gives slight extra color but no syntax or format detail beyond the schema.

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 resource: decompile dex into smali, which is unambiguous about the transformation performed. It does not, however, differentiate itself from related siblings like static_unpack or the blackdex/frida unpacking tools that also produce dex artifacts.

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?

There is no explicit when-to-use guidance or mention of alternatives among the many sibling tools. The parenthetical about the 'unpacking output directory' hints at a pipeline position but leaves the agent to infer when this tool is the right next step.

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