Skip to main content
Glama

Clean Gradle Build

gradle_clean
DestructiveIdempotent

Deletes an Android project's build output so stale artifacts and cached files no longer cause failed builds. Run before rebuilding to start from a clean state.

Instructions

Clean the build output of an Android project

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>"
    },
    "name": "gradle_clean"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectDirYesAbsolute path to the Android project root directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is covered structurally. The description adds the useful scoping detail that only build output is removed, but says nothing about whether caches or generated sources are also deleted, whether the deletion is reversible, or what a failure looks like.

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 clause with zero filler; the verb and target arrive immediately and nothing is repeated from the title or annotations.

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?

For a one-parameter destructive operation, the annotations and schema cover risk and input semantics, so the description is minimally viable. It nonetheless omits what an agent needs to sequence correctly: the state required beforehand and whether a rebuild is expected afterward.

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?

With a single parameter at 100% schema description coverage, the schema fully documents projectDir as an absolute path to the project root. The description adds no additional meaning to the parameter, which is acceptable given the schema already carries it.

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?

The description states a specific verb ('Clean') and resource ('build output of an Android project'), so the operation is unambiguous. It does not distinguish itself from the sibling gradle_build or say how cleaning relates to a subsequent build, so sibling differentiation is left to the name alone.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus gradle_build, gradle_task, or a manual rebuild, and no stated prerequisites such as an existing build directory or a Gradle wrapper. The agent must infer the workflow context entirely from the tool name.

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