Skip to main content
Glama
android-build-agent

android-build-agent

by Tommyface

android_build

Builds a registered Android project using whitelisted Gradle tasks and returns APK paths, sizes, SHA-256 hashes, exit codes, duration, and log tails for verification.

Instructions

构建指定项目。返回 ok / exitCode / 耗时 / APK 列表(路径、大小、sha256)/ 日志尾部。任务限定在 assembleDebug、assembleRelease、bundleRelease、lint 等白名单内。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "profile": "<profile>"
    },
    "name": "android_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskNo默认 assembleDebug;支持 :app:assembleDebug
cleanNo是否先 clean
profileYes
timeoutSecNo超时秒数,默认 3600
updateSourceNo构建前 git pull

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the return shape and the task whitelist constraint, which are real behavioral facts. It omits important operational traits: whether the call blocks for the whole build (default timeout 3600s implies long-running), whether a toolchain must be installed beforehand, and what happens on whitelist violation or timeout.

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?

Two dense sentences: purpose and return contract first, constraint second. No filler and nothing repeated from structured fields beyond necessary contract detail.

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?

No output schema exists, and the description compensates by enumerating the return payload, which is good. But for a multi-minute mutation-style build with a required, undocumented `profile` parameter and sibling tools for toolchain setup and profile listing, the description should say what must be true before calling and whether the call blocks.

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 80% — task, clean, timeoutSec, and updateSource already have schema descriptions, so the baseline is 3. Crucially, the one required parameter with no schema description (`profile`) is also undefined in the description; "指定项目" hints at it but never explains what a profile is or where to find one.

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?

Specific verb+resource ("构建指定项目") plus an explicit enumeration of return values. It is less clear against the sibling android_get_build_result, since the described return payload (APK list, log tail) overlaps with what a "get result" tool would plausibly do, and the description never routes between the two. Also, "指定项目" is loose — the actual required input is `profile`, not a project.

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 whitelist sentence (assembleDebug / assembleRelease / bundleRelease / lint) is useful scope-setting and implies when the tool applies. However, there is no explicit statement of when to use this versus android_get_build_result, and no stated prerequisite such as installing a toolchain first or verifying the profile via android_list_profiles.

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