Skip to main content
Glama

decompile_apk

Idempotent

Decompile APK, DEX, JAR, AAR, or ZIP files into readable Java-like source with jadx for code reading and searching. Use for analysis only; output can't be rebuilt into an APK.

Instructions

Decompile an APK (also .dex, .jar, .aar, .zip) to readable Java-like source with jadx, for reading and searching. The output is reference code that cannot be rebuilt into an APK - use decode_apk if you need to edit and rebuild. Writes into the workspace's jadx directory (a re-run writes into the same one) and returns { outputDir, fileCount, files, stdoutTail, stderrTail? }; files holds at most 200 relative paths, so use list_files or search_code to explore the rest. Waits up to 2 minutes for jadx; on a very large APK the call can time out with an error while the decompile keeps running in the Gateway. Requires jadx on PATH.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apkPathYesAbsolute path to the file to decompile, e.g. "/sdcard/Download/app.apk". Must exist; extension must be .apk, .dex, .jar, .aar or .zip. A path from get_inbox_apks works.
workspaceNoWorkspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to "default".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.3.7
    • changedInput schema / properties / apkPath / description
      Previous value: -"Absolute path to the .apk file to decompile"New value: +"Absolute path to the file to decompile, e.g. \"/sdcard/Download/app.apk\". Must exist; extension must be .apk, .dex, .jar, .aar or .zip. A path from get_inbox_apks works."
    • changedInput schema / properties / workspace / description
      Previous value: -"Workspace name (not id) - created automatically if it doesn't exist yet. Defaults to \"default\"."New value: +"Workspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to \"default\"."
  2. Changed1 schema field changedv1.3.1
    • changedInput schema / properties / apkPath / description
      Previous value: -"Absolute path to the .apk file"New value: +"Absolute path to the .apk file to decompile"
  3. First observedv1.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that output is reference-only and non-rebuildable, where files are written, that re-runs reuse the same directory, the exact return payload shape, the 200-path cap, the 2-minute wait, the timeout-but-still-running behavior in the Gateway, and the jadx-on-PATH prerequisite.

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 dense paragraph, front-loaded with purpose and the decode_apk distinction, then constraints. Nearly every clause carries operational value, though the return-shape and timeout details could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description compensates by describing the returned object fields explicitly, plus truncation, timeout, and prerequisite behavior. Nothing an agent needs to invoke it correctly is missing.

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 the schema already documents apkPath formats and the workspace semantics; the description adds only the note that a path from get_inbox_apks works. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

States a specific verb (decompile) plus resource (APK and related archives) and the tooling (jadx), and explicitly distinguishes itself from decode_apk for rebuild workflows. An agent can pick between the two decompile/decode siblings without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative and its selection condition: 'use decode_apk if you need to edit and rebuild'. It also routes follow-up exploration to list_files or search_code when results are truncated. Both when-to-use and when-not are covered.

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