Skip to main content
Glama

TurnSignal for Playwright

Source of the turnsignal npm package: the Playwright reporter, the turnsignal CLI and the TurnSignal MCP server for coding agents. MIT licensed.

TurnSignal keeps every Playwright test's results across CI runs and branches, and labels each failure as a new failure, also failing on main or known flaky. Package docs: packages/turnsignal/README.md.

MCP server

Read-only Playwright CI results for coding agents (Claude Code, Cursor, Copilot, ...). Before an agent "fixes" a failing test, it can check whether the failure is new in this pull request, already failing on main, or known flaky.

Tool

What it returns

turnsignal_recent_runs

Recent CI runs: verdict, status, branch, commit, counts, run id

turnsignal_run

One run's results: new failures, already failing, flaky, missing tests, with errors

turnsignal_test_history

One test's recent outcomes across runs

turnsignal_flaky_tests

Tests that were flaky in the last N days, most flaky first

{
  "mcpServers": {
    "turnsignal": {
      "command": "npx",
      "args": ["-y", "turnsignal", "mcp"],
      "env": { "TURNSIGNAL_TOKEN": "<project token from https://app.turnsignal.ai>" }
    }
  }
}

Claude Code: claude mcp add turnsignal -e TURNSIGNAL_TOKEN=<token> -- npx -y turnsignal mcp

The server talks JSON-RPC over stdio and only reads data the project token can see. It is listed in the official MCP Registry as ai.turnsignal/turnsignal.

Related MCP server: QA Copilot MCP Server

Layout

Path

What

packages/shared

Wire format, test identity, secret redaction

packages/playwright-reporter

The Playwright reporter (crash-safe local copy, never changes your exit code)

packages/cli

turnsignal upload, comment, governance, doctor, mcp (src/mcp.ts)

packages/turnsignal

The published package: an esbuild bundle of the three above

npm ci
npm test            # build + unit tests
npm run package     # builds packages/turnsignal/dist

The hosted service (API and web app) is not part of this repository; ADR-NNN references in code comments point to its internal design records. This repository is a mirror: changes land upstream and are synced here, so please report issues to hello@turnsignal.ai or open an issue. Questions: hello@turnsignal.ai.

Available Tools

4 tools
turnsignal_flaky_testsB

Tests that were flaky (failed, then passed on retry) in the last N days, most flaky first, with counts.

ParametersJSON Schema
NameRequiredDescriptionDefault
daysNo

TDQS

B3.4/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It usefully defines the 'flaky' criterion, the sort order, and that counts are included, but says nothing about result limits, truncation, lookback default behavior at the 90-day cap, or permissions.

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?

A single front-loaded sentence with the resource first and the definition, ordering, and output shape packed in without waste. Every clause earns its place.

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

Completeness4/5

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

For a simple one-parameter read tool with no output schema, the description covers what is returned (counts, ordering) and the semantics of flakiness. Only edge details like result caps or the interpretation of the maximum window are absent.

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 coverage is 0%, but there is only one self-explanatory integer parameter ('days'). The phrase 'last N days' confirms it is a lookback window, matching the schema default of 14, but the description adds no detail beyond what the parameter name already conveys.

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

Purpose4/5

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

States a specific resource (flaky tests) with an explicit definition of 'flaky' (failed then passed on retry), plus ordering and payload (most flaky first, with counts). This is clearly distinguishable from a generic test-history or recent-runs tool, though no sibling is named directly.

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

Usage Guidelines2/5

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

No when-to-use guidance and no alternatives named. It is implied that this is for investigating flakiness rather than viewing runs, but an agent gets no explicit trigger or exclusion relative to turnsignal_test_history or turnsignal_recent_runs.

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

turnsignal_recent_runsA

Recent CI runs of this project, newest first: verdict, status, branch, commit, counts and run id. Use it to find a run to inspect.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
branchNoOnly runs on this branch

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden: it discloses sort order ('newest first'), the exact fields returned (verdict, status, branch, commit, counts, run id), and the scope restriction to 'this project'. That is substantive behavioral context for a list tool, though pagination/limit behavior is left unstated.

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?

Two compact sentences, no filler: the first front-loads what comes back and in what order, the second states the usage. Every clause earns its place.

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

Completeness3/5

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

Since there is no output schema, the description usefully enumerates return fields, and the absence of annotations is partly offset by the ordering and scope notes. However, it omits the filtering semantics of 'branch' and the cap behavior of 'limit', leaving an agent to guess at invocation details.

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

Parameters2/5

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

The schema only documents 'branch' (50% coverage), and the description says nothing about either parameter – it never mentions that 'branch' filters results or that 'limit' caps the count. Listing 'branch' among returned fields could even mislead an agent into thinking it isn't also a filter.

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

Purpose4/5

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

States a specific verb and resource ('Recent CI runs of this project') and even enumerates the fields returned plus the sort order, which is more than most list tools do. It doesn't name a sibling, but 'find a run to inspect' implicitly distinguishes it from turnsignal_run.

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?

'Use it to find a run to inspect' gives a clear selection context and quietly points at turnsignal_run as the follow-up tool. No explicit when-not or exclusions are given, so it stops short of a 5.

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

turnsignal_runA

One run explained: the verdict, and every failed, flaky or missing test with its file:line, error message, code snippet, whether the failure is new or already on the default branch, and links to its trace/video/screenshot. Pass runId, or runKey (e.g. "github:1234567"), or neither for the latest run.

ParametersJSON Schema
NameRequiredDescriptionDefault
runIdNo
branchNoWith neither id nor key: the latest run on this branch
runKeyNo

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the return contract in detail (failure classification, new-vs-default-branch status, artifact links), which is the main behavioral disclosure an agent needs for a retrieval tool with no side effects. It says nothing about auth requirements, rate limits, or what happens if both runId and runKey are supplied, which keeps it from a 5.

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?

A single dense sentence whose first clause states the purpose and whose remaining clauses enumerate the payload, followed by a short sentence covering invocation. Every clause carries information and the scoping/precedence rule is front-loaded after the purpose.

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

Completeness4/5

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

With no output schema and no annotations, the description must explain both the return payload and how to target a run, and it does both. The only gap is the branch parameter's interaction with runId/runKey and the absence of any operational notes (auth, limits), which is minor for a read-only retrieval tool.

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 low (33%: only 'branch' is documented), so the description must compensate and largely does, explaining the meaning and precedence of runId, runKey (with format example), and the 'neither' fallback to the latest run. It leaves the interplay with the branch parameter (branch only vs. branch with id/key) unstated, so it is not fully complete.

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?

Opens with a specific verb+resource framing ('One run explained') and enumerates exactly what the run detail contains (verdict, failed/flaky/missing tests with file:line, error, snippet, new-vs-default-branch, trace/video/screenshot). This is clearly distinguishable from the sibling list/history/flaky tools, so an agent can route without opening the schema.

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?

Gives explicit selection guidance: pass runId, or runKey (with a concrete example format 'github:1234567'), or neither for the latest run. It does not name the siblings (e.g., turnsignal_recent_runs as the way to obtain a runId) or state exclusions, so it stops short of full when/when-not guidance.

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

turnsignal_test_historyA

One test's recent results across runs (newest first): outcome, branch, run. Use it to tell a new breakage from a long-flaky test. testKey comes from turnsignal_run.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
testKeyYes

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the ordering (newest first) and the returned fields, which is useful behavioral context, but says nothing about limits, pagination, or what happens when no runs exist for the test.

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?

Two tightly written sentences with no filler; purpose, output shape, use case, and parameter provenance are all front-loaded.

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

Completeness3/5

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

For a simple two-param read tool this is close to adequate, but with no annotations and no output schema, the description should clarify mutation safety (it's implicitly read-only but never says so) and the limit behavior.

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 coverage is 0%, but only two parameters exist. The description explains testKey's provenance ('comes from turnsignal_run'), which is valuable, but the 'limit' parameter is left entirely undocumented in both the schema and the description.

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?

States a specific verb+resource: returns one test's recent results across runs, ordered newest-first, with the returned fields named (outcome, branch, run). This is distinguishable from siblings like turnsignal_flaky_tests and turnsignal_run.

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?

Gives a clear use case: 'Use it to tell a new breakage from a long-flaky test.' That's a genuine when-to-use signal. It doesn't explicitly contrast with the sibling turnsignal_flaky_tests, which is the closest alternative, so it stops short of a 5.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedturnsignal_flaky_tests
    • First observedturnsignal_recent_runs
    • First observedturnsignal_run
    • First observedturnsignal_test_history

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a clearly distinct scope: recent_runs lists runs, run details a single run, test_history tracks one test across runs, and flaky_tests aggregates flaky tests over a time window. The descriptions explicitly state the progression (find a run, inspect it, drill into a test) so an agent can pick the right tool without overlap confusion.

Naming Consistency4/5

All names use a consistent turnsignal_ prefix with snake_case, giving a predictable pattern. The only minor wrinkle is the noun-phrase style (run vs recent_runs, test_history, flaky_tests) with a singular/plural pair that could momentarily blur, but it remains readable and coherent.

Tool Count5/5

Four tools is a tight, well-scoped set for a read-only CI test inspection domain, with each tool covering a distinct layer (runs, run detail, test history, flaky aggregation). No tool feels redundant or missing at this scale.

Completeness4/5

The surface covers the core diagnostic lifecycle: find runs, explain a run, trace a single test over time, and surface flaky tests. Minor gaps exist (e.g. no way to list all tests in a run, compare runs, or fetch raw logs), but agents can work around these via the run detail tool.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers