Skip to main content
Glama

get_coverage_report

Run a JaCoCo coverage report Gradle task and summarize code coverage: overall line/branch/method/class percentages with per-package breakdown, worst-covered first. Supports multi-module merging and optional JSON output.

Instructions

Run a JaCoCo coverage-report Gradle task in project_dir (default 'jacocoTestReport', which runs the JVM unit tests first) and summarize the resulting code coverage: overall line/branch/method/class percentages plus a per-package breakdown, worst-covered package first. In a multi-module build every module's report is merged into one set of totals, and the merged report files are listed. IMPORTANT — 'jacocoTestReport' is NOT a task the Android Gradle plugin defines; it exists only if the project declares it. If the task is not found, run list_gradle_tasks and look for AGP's built-in 'createDebugUnitTestCoverageReport' (present when a build type sets enableUnitTestCoverage = true) and pass it as task=; both write the same JaCoCo XML and both are read. Covers JVM unit tests only, not instrumented (on-device) tests — there is no on-device analogue. Pass json=true for structured JSON instead of the text form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoExtra arguments passed to Gradle (e.g. --stacktrace).
jsonNoReturn structured JSON instead of the human-readable text summary.
taskNoGradle task that generates the JaCoCo XML report. Defaults to jacocoTestReport, which is NOT a task the Android Gradle plugin defines — it exists only if the project declares it. If it is missing, check list_gradle_tasks for AGP's built-in "createDebugUnitTestCoverageReport" (present when a build type sets enableUnitTestCoverage = true). Module-qualified names work: ":app:jacocoTestReport".
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.
Behavior5/5

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

with no annotations provided, the description carries full burden and meets it: it discloses that the default task runs jvm unit tests first, that in multi-module builds reports are merged, and the json option for structured output. it also explains the caveat about task availability and fallback, providing complete transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

description is relatively compact for the amount of detail provided; front-loaded with the main action. the important caveat section is capitalized. one minor improvement: the fallback instructions could be slightly more succinct.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

given the tool's moderate complexity (4 params, no output schema, no annotations) the description leaves no essential gaps. it explains default behavior, multi-module handling, fallback for missing tasks, scope limits (jvm only), and output format options. no need for more.

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 coverage is 100% so baseline is 3. the description adds some context for the task parameter (explaining the non-default nature of jacocoTestReport and fallback task) but the other parameters (args, json, project_dir) are adequately described in the schema already. no significant extra value beyond schema.

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?

description clearly states the tool runs a specific gradle task and summarizes code coverage with detailed metrics (line/branch/method/class percentages, per-package breakdown). it distinguishes itself from similar sibling tools like get_file_coverage or run_unit_tests, covering a distinct purpose.

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?

description explicitly tells when to use this tool, warns that jacocoTestReport is not an android gradle plugin default, and tells the agent to fall back to list_gradle_tasks and pass the built-in createDebugUnitTestCoverageReport instead. also clarifies it covers only jvm unit tests, not instrumented tests, and states there is no on-device analogue.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iksnerd/adb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server