Skip to main content
Glama
byreshb

testing-toolkit-mcp

by byreshb

Explain a test's flakiness score

flake.explain
Read-onlyIdempotent

Get a detailed score breakdown for a single test, showing each factor that contributes to flakiness and the detector's explanation.

Instructions

Returns the score of one test with every component that contributed to it (flip rate, rerun recovery, failure-message entropy, confidence interval, correlations with runner and hour) and the explanation flake-detector gives. Test ids look like com.acme.CheckoutTest#appliesCoupon.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRepository root to run in; defaults to TOOLKIT_REPO
testIdYesTest id as class#method, for example com.acme.CheckoutTest#appliesCoupon

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
runsYes
scoreYes
failuresNo
flipRateNo
wilsonLowNo
componentsNo
wilsonHighNo
explanationNo
quarantinedNo
hourCorrelationNo
rerunRecoveryRateNo
runnerCorrelationNo
failureMessageEntropyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1-SNAPSHOT

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds no additional behavioral context (e.g., auth, rate limits) beyond what the annotations provide. It does mention the output components, but that relates to return value, not behavior. No contradictions exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, information-dense sentence that front-loads the core purpose ('Returns the score of one test') and then lists the specific components and the test id format. No wasted words; every clause adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a complete input schema, an output schema, and a description that enumerates the return components and provides the test id format. An agent has everything needed to call it correctly: required testId, optional repo, and expectations for the response. No gaps are apparent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for both parameters (repo and testId). The description repeats the test id format already present in the schema, adding no new semantics. Since the schema fully documents parameters, the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Returns') and resource ('score of one test'), and enumerates the components that make up the score (flip rate, rerun recovery, etc.). This clearly differentiates it from sibling tools like flake.rank (which ranks multiple tests) and flake.quarantine.list (which lists quarantined tests) by focusing on a single test's explanation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a use case (explaining a single test's flakiness score) but does not explicitly state when to use this tool versus alternatives. No exclusions or alternative routing are mentioned, leaving the agent to infer based on the name and single-test focus. Clear context is present, but explicit guidance is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.