Skip to main content
Glama

List gradle projects

list_gradle_projects
Read-only

List Gradle modules (sub-projects) in an Android project to find module paths for targeted builds, variant checks, or running tasks like :app:assembleDebug.

Instructions

List the Gradle modules (sub-projects) in project_dir (gradlew projects) — the map of a multi-module build, e.g. :app, :core, :feature:login. Use it to find which module to point gradle_build/list_gradle_variants at, or to address a task at one module with ':' (e.g. :app:assembleDebug). A single-module build reports no sub-projects.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_gradle_projects"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds real behavior context by noting it shells out to the Gradle wrapper and that single-module builds report no sub-projects. It stops short of mentioning execution cost/timeouts or failure modes when the wrapper is missing.

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 dense sentences, purpose front-loaded, with the sibling routing and the task-path syntax following in priority order. No filler or repetition of the title.

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 single-optional-parameter read tool with no output schema, the description supplies the return shape (a module map with examples) and the edge case of a single-module build. Minor gap: nothing on behavior when project_dir is unresolved or gradlew is absent.

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% and the schema already explains project_dir, including the session_set_defaults fallback. The description only implies the path is where gradlew runs, adding little beyond the schema, so the baseline of 3 applies.

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?

Names a specific verb and resource (list Gradle modules/sub-projects) and grounds it in the underlying command (gradlew projects). It explicitly differentiates from sibling tools gradle_build and list_gradle_variants, so the agent can select it without opening any schema.

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

Usage Guidelines5/5

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

States concrete follow-on use cases: find the module to pass to gradle_build/list_gradle_variants, or address a task with '<path>:<task>' syntax. The alternative tools are named and the condition that selects them is spelled out.

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