MCP server for Gradle optimization analysis, providing tools for build scan analysis, cache profiling, configuration cache auditing, dependency inspection, and parallelism bottleneck detection
gradle-opt-mcp presents a specialized Gradle analysis toolkit with consistent naming conventions and structured parameter schemas, but exhibits moderate gaps in LLM-optimization, parameter descriptions, and output documentation. All 10 tools follow the verb_noun naming pattern (analyze_*, profile_*, audit_*, inspect_*, gradle_*, get_*, verify_*), which is positive. However, parameter descriptions are sparse or missing in many tools, output schemas are not explicitly documented, and error handling guidance is minimal. The server targets a technical domain (Gradle optimization), which partially explains dense documentation, but descriptions could still be more LLM-friendly (current avg ~120 chars, below 150-200 char optimal for agent reasoning). Tool names are precise and disambiguated (e.g., analyze_build_scan vs analyze_build_dry_run vs analyze_parallelization_bottlenecks clearly distinguish intent), but the lack of input validation examples and output structure definitions reduces agent predictability.
Analyze the Gradle task execution graph with --dry-run (no compilers/tests). Returns taskCount, module/leaf-type groupings, a capped scheduled-task sample, and failureReason on Tooling API errors.
Parse a local plain-text Gradle task-outcome dump for cache hit/miss ratio, longest timed tasks, and GC pauses. Requires projectDir. Provide dumpFilePath to a supported dump (task lines like `:module:task FROM-CACHE 120ms`; optional `GC pause: Nms`). Fails closed with NO_DATA when no dump is provided. Does not run Gradle and does not fetch remote build scans.
Summarize a Gradle --dry-run task graph for parallelism heuristics: taskCount, byModule/byLeafType histograms, capped heuristicCriticalTasks (not a real critical path), and bottleneck module hints. Recommended tasks: classes, assemble, or build — avoid help. Fails closed on non-Gradle dirs / Tooling errors; EMPTY_GRAPH / SHALLOW_GRAPH when the schedule has no useful signal.
Audit configuration-time inputs and problems that affect Configuration Cache. Parses the Gradle configuration-cache HTML report into input counts, notable inputs (env/sys/file/custom sources), problems, and cache action. Prefer this response over opening the HTML.
Inspect Gradle dependency resolution for one module: selected version, selection reasons, and capped dependency paths. Defaults to the root project when modulePath is omitted. Fails closed on unknown configuration; returns isError when the dependency is not found.
Parameter descriptions incomplete. Tools like profile_cache_invalidation_timeline, gradle_deps, analyze_build_dry_run, gradle_health, and analyze_parallelization_bottlenecks have parameters (limit, configuration, tasks, maxFiles) with minimal or no description. LLMs cannot infer what these parameters control without explicit guidance.
Output schemas not documented. No tool exposes a structured output schema showing what fields agents should expect (e.g., analyze_build_scan returns BuildScanResult with cacheHitRatio, longRunningTasks, recommendations; gradle_deps returns dependency counts and conflicts). Without documented output types, LLMs cannot plan downstream operations reliably.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 52 | 2026-07-28+ | v2 |
Summary-first resolved dependency inventory: counts, GAV-grouped conflicts, and a capped direct-dependency list. Default configs are compileClasspath/runtimeClasspath (pass configuration=all for every resolvable config). Requires projectDir.
Perform a system & workspace orientation health check on a Gradle project, returning Gradle/Java environment versions, project structure, wrapper properties, configuration flags, and a gaps block for missing/mismatched setup.
Static scan of Declarative Gradle .dcl files and known ecosystem plugin IDs in settings/build scripts. Reports software-type blocks found in .dcl content, scanned roots, and empty-state status (NOT_DECLARATIVE / NO_DCL / HAS_DCL). Not a live schema registry or Tooling API software-type dump.
Profile Configuration Cache invalidations across consecutive configuration-cache-report.html files: real cacheAction, requested tasks, and input-set diffs. Prefer audit_configuration_cache_inputs for a single-build deep input audit.
Static audit of gradle/verification-metadata.xml only: checksum coverage gaps and trusted-artifact overrides. Does not resolve declared dependencies, validate keyrings, or run Gradle verification. Caps missing-checksum components (default 500) and trusted overrides (default 50); sets truncated when capped. Missing metadata returns VERIFICATION_NOT_CONFIGURED with --write-verification-metadata guidance.
Tool descriptions lack WHEN guidance. Most descriptions explain WHAT the tool does, but omit WHEN to call it vs. similar tools. E.g., analyze_build_scan vs profile_cache_invalidation_timeline both analyze performance, but the distinction is unclear. analyze_build_dry_run vs analyze_parallelization_bottlenecks both analyze task graphs; the separation should be explicit.
Error handling lacks actionable recovery guidance. Descriptions mention 'Fails closed on...' or 'returns isError when...' but do not guide the agent's next step. E.g., get_dependency_insight says 'returns isError when the dependency is not found' but offers no suggestion (try search_dependencies? list all deps? suggest alternatives?). Pattern: recovery-guide missing.
Parameter constraints not formally specified. Tools accept integer parameters (maxListedTasks, limit, maxDependencies, maxPaths, maxReasons, maxFiles, maxElementsPerFile, maxNotableInputs, maxMissingChecksumComponents, maxTrustedArtifacts) but do not declare min/max bounds. Descriptions mention 'default ${...}' (e.g., BuildScanRequest.DEFAULT_MAX_LISTED_TASKS) but the constant is not visible in schema, forcing LLMs to guess reasonable values.
Boolean parameters not well-explained. gradle_deps has an includeTransitive boolean and onlyConflicts boolean; their descriptions are missing from the provided schema. Similarly, other tools with boolean flags do not explain the consequences of each state.
No result pagination or limits enforcement documented. Tools like gradle_deps mention 'capped direct-dependency list' and 'capped conflict list' but do not declare max result size or pagination mechanism. Tools returning lists should explicitly state: will results be truncated? how many? is there a cursor/offset? This prevents context-window exhaustion.