Skip to main content
Glama

List Gradle tasks

gradle_tasks
Read-onlyIdempotent

Lists available Gradle tasks for an Android project, supports filtering, and caches results until build files change.

Instructions

Lists Gradle tasks (cached until build files change). Use filter to narrow, e.g. "lint" or "assemble".

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_tasks"
  }
}

Input Schema

NameRequiredDescriptionDefault
filterNoSubstring of task name/description
refreshNoIgnore cache
projectDirYesAbsolute path to the Android project (gradlew is searched upwards)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare this a safe, idempotent read, so the bar is lower, and the description still adds real behavioral context: results are cached until build files change, and the refresh parameter bypasses that cache. That caching/invalidation detail is exactly the kind of trait annotations cannot express.

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 short sentences with the core behavior front-loaded and the caching caveat attached immediately after it. Nothing is redundant or padded.

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 simple, read-only listing tool with full schema coverage and complete annotations, the description covers purpose, caching semantics, and filtering adequately. The only minor gap is the absence of any hint about the shape of the returned task list, which matters somewhat since there is no output schema.

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 100%, so the baseline is 3, but the description goes beyond the schema's generic "Substring of task name/description" by giving concrete filter examples ("lint", "assemble") that show the expected granularity. It does not mention refresh or projectDir, but those are already well documented in the schema.

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 uses a specific verb and resource ("Lists Gradle tasks"), which is unambiguous and clearly distinct from siblings like gradle_build or gradle_test. It stops short of explicitly contrasting itself with those siblings, but the purpose is immediately graspable.

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?

The only guidance is "Use filter to narrow", which is parameter advice rather than when-to-use direction. There is no statement of when to call this instead of gradle_build or gradle_test, nor any prerequisite or exclusion.

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