triagekit-mcp-flaky-test-detective
v0.1.0MCP server that tells flaky tests from genuinely broken ones using real CI run history, and generates synthetic test data / API contract diffs for QA…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
classify_test_failure
Classify a test's recent pass/fail history as consistently-failing, consistently-passing, intermittent (flaky), or insufficient-data, with the supporting run-by-run evidence attached.
| Parameter | Type | Description |
|---|---|---|
repo * | string | GitHub repo as "owner/name". |
test_name * | string | Full test name (e.g. "tests.test_foo.test_bar") or bare test name. |
lookback_runs | integer | How many recent workflow runs to pull history from. |
get_flaky_test_leaderboard
Rank all tests in a repo's recent CI history by computed flake rate.
| Parameter | Type | Description |
|---|---|---|
repo * | string | GitHub repo as "owner/name". |
lookback_runs | integer | How many recent workflow runs to pull history from. |
min_runs | integer | Minimum observed runs required for a test to be ranked. |
diff_failure_stack_traces
Cluster a test's failures by stack-trace/message similarity, surfacing whether "flaky" is really one root cause or several distinct ones.
| Parameter | Type | Description |
|---|---|---|
repo * | string | GitHub repo as "owner/name". |
test_name * | string | Full or bare test name to analyze. |
lookback_runs | integer | How many recent workflow runs to pull history from. |
correlate_flake_with_infra
Check whether a test's flake rate correlates with the CI runner it executed on - a signal of runner/shard-specific contention rather than genuine non-determinism.
| Parameter | Type | Description |
|---|---|---|
repo * | string | GitHub repo as "owner/name". |
test_name * | string | Full or bare test name to analyze. |
lookback_runs | integer | How many recent workflow runs to pull history from. |
suggest_quarantine_candidates
Return tests whose flake rate is above the threshold and whose pattern is genuinely intermittent (not just consistently broken) - the set worth quarantining.
| Parameter | Type | Description |
|---|---|---|
repo * | string | GitHub repo as "owner/name". |
flake_threshold | number | Minimum flake rate (0-1) to be considered a quarantine candidate. |
lookback_runs | integer | How many recent workflow runs to pull history from. |
file_flaky_test_ticket
Open a Jira ticket for a flaky test, pre-filled with flake-rate evidence (typically the dict returned by classify_test_failure or diff_failure_stack_traces). Requires Jira credentials: TRIAGEKIT_FLAKY_TEST_DETECTIVE_JIRA_BASE_URL, _JIRA_EMAIL, and _JIRA_API_TOKEN (or the native JIRA_API_TOKEN env var) - see the README Authentication section. Returns created=False with setup guidance if not configured.
| Parameter | Type | Description |
|---|---|---|
evidence * | object | Structured findings to include in the ticket description. |
project_key * | string | Jira project key to file the ticket under (e.g. "QA"). |
repo * | string | GitHub repo as "owner/name". |
test_name * | string | Full or bare test name the ticket is about. |
generate_synthetic_test_data
Generate synthetic test fixtures from a JSON-Schema fragment or an example payload.
| Parameter | Type | Description |
|---|---|---|
schema_or_example * | object | A JSON-Schema-like dict (type/properties/items/...), or - when is_example=True - a realistic example payload to infer a schema from. |
count | integer | Number of records to generate (1-1000). |
is_example | boolean | Set True when schema_or_example is an example payload rather than a schema. |
diff_api_contract
Diff two OpenAPI specs (spec_a = old/baseline, spec_b = new/candidate) and classify each change as breaking or non-breaking - e.g. for a CI contract-testing gate.
| Parameter | Type | Description |
|---|---|---|
spec_a * | object | The baseline OpenAPI spec, as a parsed dict (paths/components/...). |
spec_b * | object | The candidate OpenAPI spec to compare against the baseline. |