MCP server for .NET code coverage analysis using XPlat Code Coverage and Cobertura XML parsing
Server has well-structured tool definitions with explicit schemas and descriptions. All 6 tools are properly registered with [McpServerTool] attributes and parameter descriptions via [Description]. Naming follows verb_noun convention (RunTests, GetCoverage, GetUncovered, GetFile, GetDiff, InsertTest). However, descriptions vary in quality, some are detailed (RunTestsWithCoverage: 180 chars), others are terse (GetCoverageSummary: 140 chars). Parameter schemas are complete with types and descriptions, but output schemas are not formally documented in the code. Error handling returns structured JSON errors with actionable messages (e.g., 'pathNotAllowed', 'buildError', 'timeout'). No tool annotations (readOnlyHint/destructiveHint) are visible, and no pagination support despite tools that could return large result sets.
Compare two Cobertura XML files (current vs. previous) to identify changed methods, new methods, and overall coverage improvement.
Parse Summary.json into class/method coverage data, sorted worst-first by branch coverage. Optional belowTarget/topN/methodsPerClass filters trim the response to the classes and methods that still need work.
Retrieve line and branch coverage for a specific file from Cobertura XML, with optional target threshold validation.
List uncovered branches for methods matching `methodName` in Cobertura XML (partial match supported).
Insert generated test code into a C# test file at a specified location (or at the end of the last class). Uses Roslyn AST when possible; falls back to string-based insertion.
Run `dotnet test` with XPlat Code Coverage and generate a JSON summary. Returns paths to Summary.json and Cobertura XML.
Output schemas not formally documented. Tools return strings (JSON or plain text) but LLMs cannot parse structure without explicit schema definitions. GetCoverageSummary returns class/method coverage data but the response format is not specified.
No tool annotations (readOnlyHint/destructiveHint/idempotentHint) present. RunTestsWithCoverage and InsertTestCode are destructive (WRITE risk) but lack destructiveHint annotation. GetCoverageSummary and others are read-only but lack readOnlyHint.
Parameter descriptions contain example values (e.g., 'OrderServiceTests', 'OrderService', 'Foo.cs'). LLMs tend to reuse examples literally rather than adapt to context, causing failures.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 54 | 2026-07-28+ | v2 |
No pagination support documented. GetCoverageSummary can return many classes/methods; GetUncoveredBranches could return many branches. Large result sets risk context window exhaustion without limit/offset parameters.
Error messages are JSON-formatted strings but not consistently structured. Some return 'JsonHelper.Error(code, message)' while others return plain text. Inconsistent error format complicates LLM error recovery.