Skip to main content
Glama

get_flaky_tests

Identify unreliable tests with high flip rates between pass and fail states to prioritize investigation and improve test stability.

Instructions

Get the list of flaky tests in a project.

When using a user API Key (gaf_), you must provide a projectId. Use list_projects first to find available project IDs.

A test is considered flaky if it frequently switches between pass and fail states (high "flip rate"). This helps identify unreliable tests that need attention.

Returns:

  • List of flaky tests with:

    • name: Test name

    • flipRate: How often the test flips between pass/fail (0-1)

    • flipCount: Number of status transitions

    • totalRuns: Total test executions analyzed

    • lastSeen: When the test last ran

  • Summary with threshold used and total count

Use this after get_project_health shows flaky tests exist, to identify which specific tests are flaky and need investigation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoProject ID to get flaky tests for. Required when using a user API Key (gaf_). Use list_projects to find project IDs.
thresholdNoMinimum flip rate to be considered flaky (0-1, default: 0.1 = 10%)
limitNoMaximum number of flaky tests to return (default: 50)
daysNoAnalysis period in days (default: 30)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gaffer-sh/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server