Skip to main content
Glama

Project modules

gradle_modules
Read-onlyIdempotent

Lists project modules and their types (app, library, jvm) by parsing settings.gradle(.kts) without running Gradle, giving a quick project overview for Android codebases.

Instructions

Cheap project overview: modules from settings.gradle(.kts) with type (app/library/jvm). Does not run Gradle.

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

Input Schema

NameRequiredDescriptionDefault
projectDirYesAbsolute path to the Android project (gradlew is searched upwards)

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 already declare read-only, idempotent, non-destructive, closed-world. Beyond that, the description discloses the data source (settings.gradle files, parsed statically) and that no Gradle invocation occurs, which tells the agent there are no side effects and no configuration-time evaluation.

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 compact sentences, front-loaded with the value proposition and followed by the key constraint. Nothing is wasted and nothing is buried.

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 one-parameter, fully annotated read tool with no output schema, the description covers source, output shape (module names plus type), and the no-execution guarantee. Only the exact return structure and possible failures (e.g. missing settings file) are left unstated, which is acceptable here.

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 single parameter already documents itself, including that gradlew is searched upwards. The description adds no path semantics of its own, so baseline 3 applies.

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 resource (modules) with its source (settings.gradle(.kts)) and what is derived (type: app/library/jvm). The closing clause 'Does not run Gradle' separates it from build/execution siblings, though no sibling is named explicitly.

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?

'Cheap project overview' frames the cost/benefit for choosing this over an execution tool, and 'Does not run Gradle' clarifies the negative case (no build, no daemon). It stops short of pointing the agent to a specific alternative when a real Gradle evaluation is required.

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