Skip to main content
Glama

build_and_run

Build an Android project with Gradle, install the resulting APK on a connected device, and launch the specified app package in one command.

Instructions

One-shot build → install → launch: runs Gradle (default task assembleDebug) in project_dir, installs the resulting APK on the device, and launches package. Equivalent to gradle_build + install_app + launch_app but in a single call. If several APKs exist under build/outputs (multi-flavor projects, leftover androidTest APKs), the newest non-test one is installed — the artifact the build just produced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoExtra arguments passed to Gradle (e.g. --stacktrace, -Pflavor=free).
taskNoGradle task to run. Defaults to assembleDebug.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
packageYesApplication package name to install and launch, e.g. com.example.app.
project_dirNoPath to the Android project root containing the Gradle wrapper (gradlew). Optional if session_set_defaults has pinned a project_dir for this session.
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the default Gradle task (assembleDebug), the APK selection heuristic (newest non-test APK), and the overall pipeline. However, it omits details like error handling, blocking behavior, or prerequisite checks, which are important for a composite tool.

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?

Three sentences: first states the core action, second provides sibling equivalence, third adds a critical nuance about multi-APK handling. Every sentence adds value; no wordiness or redundancy.

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?

Given the tool's complexity (three-step process) and absence of an output schema, the description covers the main flow but lacks information on return values, success/failure indicators, or error behavior. More detail on what the agent can expect after execution would improve completeness.

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 baseline is 3. The description does not add meaningful new semantics beyond what the schema already provides (e.g., default task, optional project_dir). It mentions the default task again but no extra depth or context for parameter usage.

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?

The description clearly states the tool does a one-shot build, install, and launch sequence. It uses specific verbs and resources ('runs Gradle', 'installs resulting APK', 'launches package') and explicitly distinguishes itself from sibling tools gradle_build, install_app, and launch_app by noting equivalence but single-call convenience.

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

Usage Guidelines4/5

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

The description explains that the tool is equivalent to three separate steps performed together, which implicitly guides agents to use it when a combined operation is desired. However, it does not explicitly state when not to use it (e.g., needing custom build flags or selective steps), leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iksnerd/adb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server