Skip to main content
Glama

coverage_check

Execute Java test classes, measure branch coverage per class, and identify uncovered lines to meet coverage goals.

Instructions

跑指定测试类并按类卡分支覆盖率,返回测试结果 / 覆盖率 / 未覆盖分支行。

Args: module_dir: 模块目录(含 pom.xml) tests: 测试类,逗号分隔(可带或不带 .java);给了 package 可留空 cover: 卡覆盖率的业务类,逗号分隔;空=ALL 汇总 min_branch: 最小分支覆盖率,支持 80 或 0.8 compile_first: True=含增量编译,保证测最新代码(默认);False=跳过编译,代码已编译时更快 reuse_forks: True=多测试类复用同一 fork JVM(默认,快得多);False=每类独立 JVM(严格隔离) package: 业务包(如 fanya/schedule);给了就自动收集该包全部测试类+业务类,tests/cover 可留空

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coverNo
testsNo
packageNo
min_branchNo
module_dirYes
reuse_forksNo
compile_firstNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behaviors: incremental compilation option, JVM fork reuse, auto-collection of tests when package is given, and acceptance of different formats for min_branch. It does not mention permissions or side effects, but for a test runner, this is acceptable.

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?

The description is structured as a clear list of arguments with explanations. While not extremely terse, every sentence adds value. It could be slightly more concise, but it remains readable and informative.

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 complexity (7 parameters, no output schema), the description covers all essential aspects: parameter descriptions, default behaviors, and return value summary. It is complete enough for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema description coverage is 0%, the description must compensate, and it does so thoroughly. It explains the purpose and acceptable formats for each parameter (e.g., tests can include/exclude .java, cover can be empty, package auto-collects). This adds significant value beyond the minimal 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?

The description clearly states it runs specified test classes and checks branch coverage, returning test results, coverage, and uncovered branch lines. It distinguishes itself from the sibling tool 'compile_project' which only compiles code.

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?

The description provides context for when to use the tool (when needing to run tests with coverage) and details on parameter usage. However, it lacks explicit guidance on when not to use it or direct comparison with alternatives.

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/ProgrammerDream/coverage-mcp'

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