Skip to main content
Glama

Build app

build

Compiles an Android module and variant into an APK, returning compiler errors and the output APK path.

Instructions

Assemble an APK for a module and variant (default: the app module, debug). Returns compiler errors and the APK path.

Input Schema

NameRequiredDescriptionDefault
moduleNoModule path, e.g. :app. Defaults to the first application module.
variantNoBuild variant, e.g. debug, release, freeDebugdebug
waitSecNoSeconds to wait before returning. If the build is still running, poll with job_status.
projectDirNoAndroid project root. Defaults to ANDROID_PROJECT_DIR or the server's cwd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does deliver the key output contract: compiler errors and the APK path. It omits important behavioral traits an agent needs — that the call blocks for a bounded time before returning, that an in-flight build must be polled via job_status, and that the build has side effects on disk. Those gaps are partially covered by the waitSec parameter description but not by the tool description itself.

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 front-loaded sentence: the action and artifact come first, then scope and defaults, then the return contract. No filler, and a reader can act on it after one pass.

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?

There is no output schema, so the description correctly names what comes back (compiler errors, APK path), and the schema fully documents the long-running/polling mechanics via waitSec and job_status. What remains missing is only a note on which sibling to reach for when the build should be run differently.

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 all four parameters are already documented with defaults, patterns, and ranges, establishing the baseline of 3. The description restates the module and variant defaults, adding light confirmation but no new semantics beyond what the schema provides.

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 artifact ('Assemble an APK') plus the two selector dimensions (module, variant) and their defaults, which is concrete and actionable. It does not differentiate itself from adjacent siblings such as gradle_run or gradle_tasks, so an agent must infer that this is the build-specific path rather than a generic Gradle invocation.

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 parenthetical defaults ('the app module, debug') imply the common case and make the zero-argument call safe, which is genuine usage guidance. However there is no explicit when-to-use framing, no exclusion of gradle_run/gradle_tasks, and no statement of prerequisites (e.g. a prior Gradle sync).

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