get_launches_statistics
List project launches with pass, fail, skip, and duration stats, filter by status or tags, and compute run and test pass rates over a selected period.
Instructions
List the launches of a project, newest first, each with its own pass, fail, skip and duration figures. Every launch row carries id, launch, status, startedAt, endedAt, durationSeconds, tags and stats - the NAME of the launch is in a field called launch, not title or name. The status is REPORTED by the CI job rather than derived from the numbers beside it, and it runs BOTH ways. A launch can be stored failed with stats.failed 0, because the job failed for a reason no test recorded. And a launch that reported nothing at all can be stored passed with stats.total 0 - one here sits 75 minutes after a real run that failed 145 tests, so reading the newest launch as green clears nothing and the earlier failures still stand. Check stats.total before treating a green newest launch as evidence. Never infer one from the other; to answer what failed, read the tests with get_launch_tests. Every launch row also carries a stats object of total, passed, failed, skipped, flaky, retries and running. total EXCLUDES skipped even though skipped is printed beside it, so the identity that holds is passed + failed + flaky = total; retries counts retry ATTEMPTS, not tests that were retried, which is why it can exceed flaky. Returns launches, a summary over the whole window (totalRuns, passedRuns, failedRuns, runningRuns, runPassRate, totalTests, totalPassed, totalFailed, totalSkipped, totalFlaky, testPassRate, avgDurationSeconds), the period and filters applied, and pagination with the real total; there is no top-level total. Read the two rates carefully, because they answer different questions and neither denominator is obvious. runPassRate is the share of LAUNCHES that ended green, out of totalRuns - and totalRuns is EVERY launch in the window. Only three of the end statuses have a bucket - passedRuns, failedRuns and runningRuns - so a launch stored as finished, interrupted, timedOut or completed is counted in totalRuns and in none of them, and the three need not add up to totalRuns. That shortfall is why get_launches_trends and run_health_check answer a slightly higher run pass rate over the same window: they count only launches that passed or failed, so their denominator is smaller. testPassRate is the share of TESTS, computed as (totalPassed + totalFlaky) / totalTests: flaky counts as a pass, because a flaky test passed on a retry and the launch is green on it, and totalTests already EXCLUDES skipped, so totalPassed + totalFailed + totalFlaky is the whole of it while totalSkipped sits outside. Both rates are null, not 0, when the window held nothing at all - testPassRate with no tests, runPassRate with no launches - since nought percent would read as a verdict on work that never ran. IMPORTANT: days defaults to 30, so a project idle for longer returns an empty list, which means nothing in the window rather than nothing at all. Use limit, offset and search to page, statuses or tags to narrow. Reach for get_launches_trends when the question is about the project over time rather than about particular launches, and get_launch_tests when you have one launch and want the tests in it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Lookback period in days | |
| tags | No | Filter by tags | |
| limit | No | Number of launches to return | |
| offset | No | Pagination offset | |
| search | No | Search the launch NAME (the launch field on each row), its id, or its tags. Launches carry no trigger metadata at all - nothing records that a run was nightly, on merge or manual, and there is no branch or CI-job field - so a request naming a run by its schedule can only be resolved through a name or tag the reporter happened to set, or by startedAt. If a name search comes back empty, say the run cannot be identified rather than assuming the newest launch is the one meant: three launches here carry byte-identical stats. | |
| statuses | No | Filter by launch status. Set by the reporters through the ingest service, so this list is fixed and not project-configurable. A launch that ended without an explicit status, and whose totals did not reconcile, is stored as finished: that is usually an empty or half-reported launch, and it counts toward totalRuns while sitting in none of the passed, failed or running buckets. | |
| projectId | Yes | Project UUID to query |