Skip to main content
Glama
diffblue

Diffblue Cover MCP Server

Official
by diffblue

issues

Identify project blockers that may prevent unit test generation, with a prioritized report and optional suggested prompts for actionable fixes.

Instructions

Invoke Diffblue Cover to identify project issues.

This tool executes the dcover issues command to output a prioritized list of project issues that may prevent test generation.

Args: path: Path to the dcover executable. If not provided, searches system PATH and the DIFFBLUE_COVER_CLI environment variable. working_directory: Root directory of the Java project to test. Defaults to the current working directory. dcover_timeout: Maximum execution time in seconds. Defaults to 600. Set to None for no timeout (not recommended). limit: Limit the number of issues to output. skip: Skip the first N issues from the report. prompt: If True, outputs a suggested prompt for each actionable issue. cover_json: Location of the JSON-formatted test-writing summary report. dry_run: If True, passes the '--dry-run' flag to check for readiness. args: Additional arguments to pass to dcover. Defaults to None. ctx: MCP server context for logging and progress reporting (auto-injected by FastMCP).

Returns: dict: Execution result containing: - return_code (int): Exit code (0 for success) - status (str): "success" if completed without errors - output (str): Complete stdout/stderr from dcover - command (list[str]): The exact command that was executed - working_directory (Path): Directory where command was run

Raises: ToolError: If dcover executable not found, command fails, or timeout exceeded. The error includes the partial output collected before failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoThe additional options to pass to dcover issues
pathNoThe path to the dcover executable
skipNoSkip the first N issues
limitNoLimit the number of issues to output
promptNoOutput suggested prompt for each actionable issue
dry_runNoRun preflight checks only (aliased as --preflight)
cover_jsonNoPath to a JSON-formatted test-writing summary report
dcover_timeoutNoThe maximum time in seconds to wait for dcover to create tests.
working_directoryNoThe directory containing the project/app

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full burden and does an excellent job. It discloses that the tool executes a CLI command, details the exact return dictionary structure (return_code, status, output, command, working_directory), explains timeout and failure behavior, and explicitly lists ToolError conditions including partial output collection. It also documents path resolution and the dry-run flag behavior.

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

Conciseness3/5

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

The description is well-organized into Args, Returns, and Raises sections, but it is long and repeats much of what the schema already provides. It also includes a 'ctx' parameter in the Args list that is not present in the input schema, which could confuse an agent. The extra noise and redundancy reduce the clarity that good structure would otherwise provide.

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 tool with 9 optional parameters and no annotations, the description is nearly complete: it covers all parameters, return values, and error conditions. The output schema is indicated as present, so the detailed Returns section is a bonus. The only notable gaps are the lack of guidance relative to sibling tools and the minor working_directory default discrepancy, but these do not leave an agent unable to call the tool correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful extra semantics beyond the schema: it explains that `path` searches system PATH and DIFFBLUE_COVER_CLI, that `dcover_timeout` defaults to 600 and setting None is not recommended, and that `dry_run` passes the '--dry-run' flag. There is a slight inconsistency for `working_directory` (description says defaults to current working directory while schema shows default '/app'), which prevents a 5.

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?

The description opens with 'Invoke Diffblue Cover to identify project issues,' which provides a specific verb, resource, and outcome. It clearly says the tool runs the `dcover issues` command and outputs a prioritized list of issues. However, it does not explicitly differentiate itself from the sibling tools 'create' and 'refactor', which are likely also Diffblue commands.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool versus alternatives. It implies a pre-test-generation use case with 'issues that may prevent test generation,' but it never mentions create or refactor as alternatives or states conditions for choosing one. An agent must infer the appropriate context.

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/diffblue/cover-mcp'

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