Skip to main content
Glama

Run Gradle tasks

gradle_run

Execute Gradle tasks through the project's wrapper and return parsed compiler errors. Runs as a job; poll with job_status if still running.

Instructions

Run Gradle tasks through the project's wrapper (e.g. ['assembleDebug'], [':app:testDebugUnitTest'], ['clean','build']). Returns parsed compiler errors. Runs as a job; poll with job_status if still running.

Input Schema

NameRequiredDescriptionDefault
argsNoExtra flags, e.g. --offline, --stacktrace, -Pfoo=bar
tasksYes
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.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the two traits an agent most needs: the invocation is asynchronous (a job, polled via job_status) and the payload is 'parsed compiler errors'. It omits failure semantics — non-zero exit handling, whether output is truncated, or what happens on timeout past waitSec.

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 short sentences, front-loaded with the action, then return shape, then async/polling behavior. No filler and no repetition of schema content.

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?

For a four-parameter tool with no output schema and no annotations, the description covers the essentials: what it runs, what comes back, and that it is asynchronous with a polling follow-up. The remaining gap is failure/timeout behavior, which matters for a build tool but is a secondary detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, with args, waitSec and projectDir already documented in the schema. The description adds real value for the undocumented-but-required 'tasks' parameter by showing accepted shapes ('assembleDebug', ':app:testDebugUnitTest', ['clean','build']), conveying the colon-prefixed module path format the regex alone only hints at.

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 resource ('Run Gradle tasks through the project's wrapper') and backs it with three concrete task-list examples including module-scoped syntax. It does not, however, distinguish itself from the sibling tools 'build' or 'gradle_tasks', which an agent would reasonably consider for the same goal.

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 description gives clear operational guidance for the async path ('Runs as a job; poll with job_status if still running'), which tells the agent what to do after invocation. It offers no guidance on when to pick this over 'build' or 'gradle_tasks', and no exclusions or preconditions such as needing a valid project directory or a completed Gradle sync.

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