Skip to main content
Glama

Run Gradle (filtered)

gradle_build

Run Gradle tasks for an Android project and get a concise outcome with failed tasks, de-duplicated file:line errors, likely causes, and warnings—ideal for replacing raw shell gradlew calls.

Instructions

Runs ./gradlew; returns outcome, failed tasks, de-duplicated errors as file:line with code context, likely-cause hints, and a warning summary. Use instead of a shell gradlew.

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": {
      "projectDir": "<projectDir>",
      "tasks": "<tasks>"
    },
    "name": "gradle_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
tasksYese.g. ["assembleDebug"] or [":app:lintDebug"]
extraArgsNoe.g. ["--offline"]
maxErrorsNoDefault 20
projectDirYesAbsolute path to the Android project (gradlew is searched upwards)
saveFullLogToNoWrite the raw log to this file
includeWarningsNoDefault true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior4/5

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

Annotations declare non-read-only, non-destructive, closed-world, so the description's job is to add operational context — and it does, spelling out the structured return payload (de-duplicated errors with code context, cause hints, warning summary) that an agent could otherwise not anticipate. It omits things like build duration, whether it blocks, and that arbitrary tasks can have side effects, so it is strong rather than complete.

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 sentences, front-loaded with the action and then the return payload, with the disambiguation sentence last. No filler or repetition of what the schema already says.

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?

With six fully documented parameters and no output schema, the description usefully supplies the return-value shape, filling the gap the absent output schema leaves. Remaining gaps are minor operational details (e.g., long-running builds, log-file behavior) that are covered adequately by the schema.

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%, including examples for tasks and extraArgs and defaults for maxErrors and includeWarnings, so the schema does the heavy lifting. The description adds no parameter-level meaning beyond it, which is the baseline-3 case.

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 ("Runs ./gradlew") and enumerates what comes back: outcome, failed tasks, de-duplicated errors with file:line, cause hints, warning summary. It clearly separates itself from invoking gradlew in a shell, but it does not differentiate from siblings like gradle_test or gradle_tasks, which an agent could plausibly confuse with this general runner.

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?

"Use instead of a shell gradlew" gives one explicit alternative and the condition that selects this tool, which is real routing guidance. It stops short of saying when to prefer the specialized siblings (gradle_test, gradle_tasks) over this filtered general runner.

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