Go code coverage analysis tool with MCP server for AI-powered coverage workflows
coverctl defines 9 tools with reasonable descriptions (avg ~180 chars) and input schemas. However, schemas lack proper JSON Schema type definitions, parameters are listed with descriptions but no explicit 'type' fields visible in the provided code. Descriptions are adequate but generic; many lack actionable context for LLM selection (e.g., 'Enforce per-domain coverage policy' doesn't explain WHEN to call 'check' vs 'suggest'). Output schemas are not documented. Error handling guidance is absent. Tool naming is clear (verb-noun: check, suggest, debt, init, report, record, badge, compare, pr-comment), but composition could be tighter, 'pr-comment' conflates VCS provider detection with posting, and 'record' mixes history capture with optional test execution.
Generate an SVG coverage badge suitable for embedding in a README or dashboard. Returns the badge SVG and the overall coverage percent; if 'output' is set, also writes the SVG to that path.
Enforce per-domain coverage policy from .coverctl.yaml across any supported language (Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, Shell). Agent-loop governance — not a Go cover wrapper. Auto-detects the language, invokes the native test runner (pytest, npm test, go test, mvn, gradle, cargo, dotnet, …), then returns per-domain pass/fail, file-level coverage, and warnings. Exit-equivalent: passed=true on success, passed=false on policy violation or runner error.
Diff coverage between two profiles (base vs head). Returns overall delta, files whose coverage improved, files whose coverage regressed, and domain-level deltas. Use to evaluate whether a code change improved or worsened coverage before committing.
Compute coverage debt: the gap between current coverage and required thresholds, ranked per domain and per file. Returns a health score (0-100) and the items contributing the most debt. Use this to direct test-writing effort to the highest-impact gaps.
Initialize coverctl for any supported language (Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, or Shell). Auto-detects the project, proposes named path-group domains from the directory layout (globs like src/api/**; Go may use ./internal/... ), and writes .coverctl.yaml with default thresholds. Call once per project.
Input schemas lack explicit JSON Schema type definitions. Parameters are described but no 'type' field (string, number, boolean, array, object) is visible in the provided code. This prevents LLMs from validating inputs and forces them to guess parameter types.
Output schemas are not documented. Tools return results (e.g., 'passed=true', 'health score 0-100', 'SVG badge') but the response structure is not formally specified. LLMs cannot plan downstream tool calls or extract fields reliably.
Descriptions lack actionable context for tool selection. 'Enforce per-domain coverage policy' (check) and 'Analyze current coverage' (suggest) are similar, the description does not explain when to call one vs the other. LLMs may pick the wrong tool.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2025-06-18+ | v2 |
Post the coverage report as a comment on a pull/merge request. Supports GitHub, GitLab, and Bitbucket; provider is auto-detected from environment variables or set explicitly. Reuses an existing coverctl comment when present (idempotent). Requires the appropriate provider token in the environment.
Append the current coverage snapshot to the project's history file for trend tracking. Captures commit/branch metadata. Run after 'check' (or pass run=true to run coverage first) so subsequent 'compare' and trend resource calls have data points.
Analyze an existing coverage profile without re-running tests. Reads whatever format the profile uses (Go coverprofile, LCOV, Cobertura, JaCoCo — auto-detected). This is policy analysis over a profile, not go tool cover. Use when a profile is already on disk from a prior CI run or a separate test invocation.
Analyze current coverage and suggest threshold values for each domain. Strategies: 'current' (set thresholds slightly below current observed coverage to lock in the status quo), 'aggressive' (set targets above current to push improvement), 'conservative' (small incremental gains). Use writeConfig=true to apply suggestions; coverctl backs up the existing file first.
No error handling guidance. Tools do not document what errors can occur, whether they are retryable, or what the LLM should do next. E.g., 'check' can fail on policy violation or runner error, but no recovery path is specified.
Tool 'pr-comment' conflates VCS provider detection with posting. Description says 'provider is auto-detected from environment variables or set explicitly', but this couples discovery logic with execution. Should separate into a discovery step or require explicit provider parameter.