qa-triage-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --db | No | Path to the SQLite database. | |
| --host | No | Host to bind when using HTTP transport. | |
| --port | No | Port to bind when using HTTP transport. | |
| --transport | No | Transport for the MCP server: stdio (default) or http for Streamable HTTP on /mcp. | |
| --reports-dir | No | Folder from which JUnit XML reports may be read. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Test-failure triage over JUnit XML history. Typical flow: cluster_failures on the latest run, then test_history on one test per cluster to see when it started, then find_flaky_tests. category_hint is only a first guess; confirm it with history before calling something a product bug. Never call quarantine_test with dry_run=false unless the user has confirmed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_report_filesA | List JUnit XML files in the reports folder and whether each one has been ingested. |
| ingest_junit_reportA | Load one JUnit XML report into the history. Works with pytest, Playwright, Cypress, Jest, JUnit, TestNG. Branch/commit/job default to the report's . Ingesting the same file twice does nothing. |
| list_runsB | Recent test runs, newest first, with pass/fail counts. |
| get_run_failuresB | Every failed or errored test in one run (latest by default). |
| cluster_failuresA | Group a run's failures by normalised error signature, so 30 red tests with one cause show as one cluster. Also says how many earlier runs had the same error, which separates new problems from old ones. |
| find_flaky_testsA | Tests that pass and fail without a consistent pattern. A test that broke once and stayed broken is a regression, not flaky, and is left out. Failing and passing on the same commit is the strongest signal. |
| compare_runsA | What changed between two runs: newly failing, fixed, still failing, added and removed tests. |
| test_historyA | One test across recent runs: pass rate, current streak, and the run (and commit) where the current failure streak began. Use it to answer "when did this start failing?". |
| quarantine_testA | Mark a flaky test as quarantined so CI can skip it until it's fixed. Defaults to dry_run=True; only pass dry_run=false after the user confirms. Appends to quarantine.jsonl and never edits test results. |
| run_readonly_queryA | Run ONE read-only SELECT against the results DB when no other tool fits. Writes, PRAGMA, ATTACH and multiple statements are rejected. Read qa://schema first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| triage_failed_run | Work out why a CI run failed and what to do about each cause. |
| flaky_test_report | A ranked list of flaky tests with a recommendation for each. |
| draft_bug_report | A ticket-ready bug report for one failing test, built from its history. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| db_schema | CREATE TABLE statements for runs, tests and results. |
| latest_run | The newest run with its failures grouped by signature. |
| quarantine_list | Tests currently marked as quarantined (from quarantine.jsonl). |
TDQS
Scored across 10 tools
Each tool has a clearly distinct job: file listing, ingestion, run listing, raw failures, clustered failures, flakiness, diffs, per-test history, quarantine, and a constrained SQL escape hatch. The closest pairs (get_run_failures vs cluster_failures, find_flaky_tests vs test_history) are explicitly differentiated in their descriptions. run_readonly_query is the only potentially overlapping tool, and it is explicitly gated as a last resort.
Nearly all tools follow a verb_noun convention (list_report_files, ingest_junit_report, cluster_failures, compare_runs, quarantine_test). The one deviation is test_history, which is noun-only rather than get_test_history, but it remains readable and predictable.
Ten tools is well within the sweet spot and each one covers a distinct step of the triage workflow. Nothing feels padded or redundant; the escape hatch is justified given the domain.
The surface covers the full triage lifecycle: ingest, list, inspect, cluster, diff, history, and quarantine. The main gap is no explicit un-quarantine/release tool, so removing a test from quarantine.jsonl has no dedicated path (only the raw query tool).