Skip to main content
Glama

Quarantine flaky tests

quarantine
Idempotent

Track flaky Playwright tests so they keep running and reporting while failures stop failing CI runs until expiry; add owner and reason, list status, or remove entries.

Instructions

Quarantine flaky tests: they keep running and being reported, but their failures stop failing run-test and the ci command until the entry expires (default 14 days, max 90). add needs owner and reason; list shows what is quarantined and what expired; remove ends it. Stored in playwright-quarantine.json (commit it).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "quarantine"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoadd: how long it counts (default 14, max 90)
fileNoSpec file, relative to the project
testNoThe test as 'file › title' (as get-failure and analyze-history print it), or use file + title
indexNoadd: the Nth failure of the last run instead of test/file/title
ownerNoadd: who will fix it (name or @handle)
titleNoTest title, or its last parts ('Checkout › pays by card')
actionNo'list' (default), 'add' or 'remove'
reasonNoadd: why it is flaky, or the issue link
projectRootNoProject directory (default: server root)

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the call failed (see error) or the tests it ran failed
errorNo
totalNo
statusNo
declinedNothe person declined the change; nothing was written

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.13.0
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -{}
    • removedInput schema / properties / owner / maxLength
      Removed value: -80
    • removedInput schema / properties / owner / minLength
      Removed value: -1
    • removedInput schema / properties / reason / maxLength
      Removed value: -300
    • removedInput schema / properties / reason / minLength
      Removed value: -3
    • addedOutput schema / properties / declined
      Added value: +{
      +  "description": "the person declined the change; nothing was written",
      +  "type": "boolean"
      +}
  2. Addedv0.7.0

TDQS

A4.7/5.0
Behavior5/5

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

With annotations already declaring readOnlyHint=false, idempotentHint=true, and destructiveHint=false, the description still adds substantial behavioral context: failures stop affecting run-test and ci, entries expire after a default of 14 days (max 90), and state is stored in playwright-quarantine.json. It also clarifies that add requires owner and reason, which is operationally important.

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 dense but front-loaded paragraph that immediately establishes purpose, effect, action semantics, and storage. Every sentence carries useful information, and no space is wasted on restating structured fields.

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?

For a 9-parameter mutation tool with an output schema, the description covers the key behavioral contract: effect on run-test/ci, expiry bounds, action mode semantics, required add fields, and persistence location. Nothing essential is missing for an agent to call it correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds workflow-level semantics: add requires owner and reason, list reports both quarantined and expired entries, and remove ends quarantine. It repeats the days default/max from the schema but does not explain file/test/index interplay beyond what the schema provides.

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 and resource ('quarantine flaky tests') and immediately explains the operational effect: tests keep running and reporting, but failures no longer fail run-test or ci until expiry. This is far more specific than the title and distinguishes the tool from siblings like diagnose-flaky or analyze-history.

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

Usage Guidelines4/5

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

It clearly explains the three action modes (add, list, remove) and the add prerequisites (owner and reason). However, it does not explicitly say when to choose this tool over diagnose-flaky or analyze-history, so the alternative-selection guidance is only implied.

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