Skip to main content
Glama

coverage_diff

Analyze patch coverage by combining git diff with per-line coverage reports. Returns rendered report with coverage percentage and gate result in YAML, markdown, or JSON.

Instructions

Analyze diff/patch coverage from a per-line coverage report plus the git diff, and return the rendered report with the patch-coverage percentage and gate result as YAML. Read-only. Mirrors omni-dev coverage diff. report is a required filesystem path to the head coverage report (lcov / llvm-cov-json / cobertura, auto-detected). format renders the report as markdown (default), yaml, or json. Unlike the CLI this tool never fails the call on a low fail_under_patch; it reports below_gate: true instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoRendered output format. Defaults to `markdown`.
reportYesHead coverage report path (lcov / llvm-cov-json / cobertura). Required.
run_urlNoLink to the CI run (markdown footer).
base_refNoBase revision to diff against (default: merge-base of `origin/main` and `HEAD`).
base_shaNoBase (merge-base) commit SHA shown in the markdown `Comparing` line.
head_refNoHead revision the report was measured at (default: `HEAD`).
head_shaNoHead commit SHA shown in the markdown `Comparing` line.
all_filesNoReport per-file deltas and indirect changes for ALL files, not just the ones the diff touches.
repo_pathNoPath to the git repository. Defaults to the current working directory.
commit_urlNoCommit-URL prefix for linking SHAs.
artifact_urlNoLink to the full coverage-summary artifact (markdown footer).
strip_prefixNoOverride the path prefix stripped from report paths to make them repo-relative (default: the repository working directory).
report_formatNoFormat of `report` (auto-detected by default).
baseline_reportNoOptional baseline coverage report path; enables project deltas and indirect-change detection.
collapse_rangesNoCollapse consecutive uncovered new lines into ranges (e.g. `9-11`).
fail_under_patchNoReport a below-gate result when patch coverage is below this percentage (the tool never fails the call; it reports `below_gate` instead).
ignore_filename_regexNoExclude files whose repo-relative path matches any of these regexes from both the head and baseline reports before computing the diff. Matching is unanchored, applied after `strip_prefix` (same semantics as `cargo llvm-cov --ignore-filename-regex`).
baseline_report_formatNoFormat of `baseline_report` (auto-detected by default).
Behavior4/5

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

The description declares the tool as 'Read-only' and notes that it never fails on low fail_under_patch but reports `below_gate: true`. This adds behavioral context beyond the input schema. For a read-only analysis tool, this is adequate, though error handling (e.g., invalid report path) is not disclosed.

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?

The description is two sentences: the first states the purpose, the second covers key parameters and behavioral differences. It is front-loaded, efficient, and contains no filler.

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

Completeness3/5

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

While the description covers the main purpose and key parameters, there is a minor inconsistency: it first says return the report 'as YAML', but later states `format` defaults to markdown. This may confuse agents. Additionally, no output schema is provided, and the description does not detail the return structure beyond mentioning 'patch-coverage percentage and gate result'.

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 coverage is 100%, so baseline is 3. The description adds value by explaining the required `report` parameter (filesystem path, auto-detected formats), the `format` parameter defaults, and the behavioral nuance of `fail_under_patch`. This goes beyond the schema descriptions.

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 the tool analyzes diff/patch coverage from a coverage report and git diff, returning a rendered report with patch-coverage percentage and gate result. It specifies the key input (report path) and behavior (read-only, mirrors CLI). This is a specific verb+resource with clear scope.

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 mentions the tool mirrors a CLI command (`omni-dev coverage diff`) and highlights a key behavioral difference (no call failure on low fail_under_patch). It explains important parameters (report, format). However, it does not explicitly state when to avoid this tool or provide alternatives, though no direct siblings exist.

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/rust-works/omni-dev'

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