Skip to main content
Glama

build_apk

Idempotent

Rebuild an APK from an apktool-decoded, edited project directory; output is unsigned and must be signed separately before installation.

Instructions

Rebuild an APK from an apktool-decoded (and possibly edited) project directory. The result is unsigned, so it won't install until you sign it separately. Writes to the workspace's apktool/build directory (overwriting a previous build of the same name) and returns { outputPath, signed: false, stdoutTail, stderrTail? }. Fails if inputDir has no apktool.yml, i.e. isn't a decode_apk output. Requires apktool on PATH.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputDirYesAbsolute path to the decoded project directory - the outputDir returned by decode_apk, possibly edited. Must contain apktool.yml.
workspaceNoWorkspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to "default".
outputNameNoOutput file name only, not a path (no "/" or ".."). Default "rebuilt.apk".rebuilt.apk

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.3.7
    • changedInput schema / properties / inputDir / description
      Previous value: -"The decoded project directory (from decode_apk), possibly edited"New value: +"Absolute path to the decoded project directory - the outputDir returned by decode_apk, possibly edited. Must contain apktool.yml."
    • addedInput schema / properties / outputName / default
      Added value: +"rebuilt.apk"
    • changedInput schema / properties / outputName / description
      Previous value: -"Output file name, e.g. \"rebuilt.apk\""New value: +"Output file name only, not a path (no \"/\" or \"..\"). Default \"rebuilt.apk\"."
    • 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. First observedv1.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond annotations by disclosing the write location (workspace apktool/build), overwrite behavior, unsigned nature, failure condition, and the exact return shape including stderrTail. Annotations already cover idempotency and non-destructiveness, but the description adds crucial operational context.

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?

Every sentence is front-loaded and earns its place: purpose, warning about unsigned output, write location, return value, failure precondition, and requirement. No redundancy or wasted words.

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?

For a mutation tool with no output schema, the description supplies the return object shape and all critical behavioral traits (overwrite, unsigned, failure mode). Combined with the rich annotations and 100% schema coverage, an agent has everything needed to call it correctly.

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 all three parameters thoroughly. The description reinforces that inputDir must contain apktool.yml and come from decode_apk, but adds no new syntax or format details beyond what the schema provides.

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 (rebuild) and resource (APK) plus the exact input source: an apktool-decoded project directory, possibly edited. This clearly distinguishes it from decode_apk and other siblings without ambiguity.

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 ties usage to decode_apk output ('from an apktool-decoded ... project directory'), warns the result is unsigned and won't install without separate signing, and states the failure precondition (missing apktool.yml) and environment requirement (apktool on PATH). No alternative build tool exists among siblings, so no comparison is needed.

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