Compresses go test output into a minimal JSON summary. Built for LLM agents that need test results without burning context on thousands of passing tests.
A 5,000-line verbose test run becomes ~10 lines of JSON with everything an agent needs to act: pass/fail counts, failing test names, packages, error output, and source locations.
{
"passed": 373,
"failed": 1,
"failures": [
{
"test": "TestBucketEndpointURL/empty_endpoint_returns_empty_string",
"package": "github.com/hegner123/modulacms/internal/config",
"output": "config_test.go:102: BucketEndpointURL() = \"\", want \"s\"",
"location": "config_test.go:102"
}
]
}When all tests pass, failures is an empty array.
go build -o reporter .Register as an MCP tool. The agent sends raw go test -json output as the input parameter and gets structured JSON back.
claude mcp add --transport stdio reporter -- /path/to/reportergo test -json ./... | ./reporter
go test -v ./... | ./reporterStdin auto-detection: piped input runs CLI mode, terminal runs MCP server. --cli flag forces CLI mode.
An LLM agent running tests gets back a wall of text. Passing that into a context window wastes tokens on information the agent can't act on (passing tests). This tool strips it down to what matters:
- Token compression: 250:1 reduction on a typical test run. 5,000 lines become the count
"passed": 5725plus only the failures with actionable detail. - Structured output: JSON the agent can parse directly instead of scanning text for
--- FAILpatterns. - Source locations:
file.go:NNNextracted and surfaced so the agent can navigate to the failure without searching.
JSON mode (go test -json): Recommended. Each line is a tagged event with the test name and package, so output attribution is reliable even with heavy parallelism and multi-line log output.
Verbose text mode (go test -v): Best-effort fallback. Works well for typical output but may misattribute lines when tests run in parallel and produce multi-line log output. The text format was never designed for machine parsing.
Auto-detected from the first non-empty line: starts with { means JSON, otherwise verbose text.
- macOS
- Linux
Windows is not supported.