Skip to main content
Glama

triage_test_coverage

Audit files or directories in one call and get a weakest-first ranked leaderboard of mutation scores, revealing where your test suite is most fragile.

Instructions

Batch triage: audit a set of files and/or directories and return a weakest-first ranked leaderboard of mutation scores, so you can see where the test suite is most fragile in one call. Directories are recursively expanded to supported source files (.ts/.js/.py/.rs/.php), skipping test files. Files are audited in parallel (see fileConcurrency, default min(4, cpus-1)), under a shared wall-clock budget (see totalTimeoutMs). Drill into a weak file with audit_code_resilience for per-mutant survivor detail: each row's file is relative to the server's working directory, so it can be passed straight back as that tool's filePath (its own target is spelled differently — see that tool's description).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoFiles and/or directories to triage, resolved against the server's working directory. Directories are recursively expanded to supported source files. Each ranked row reports its `file` in that same spelling, so a row can be fed straight back to this tool or to audit_code_resilience. Example: ["src/utils", "src/index.ts"]
diffBaseNoAuto-scope the triage to files changed in git. "HEAD" (uncommitted), "staged", or any ref/branch/SHA (merge-base with HEAD). Makes "paths" optional: diffBase alone scans all changed supported source files; diffBase + paths intersects with those paths. TypeScript files are mutated only on changed lines; other languages run whole-file. Example: "main"
maxFilesNoCap on the number of files audited (precedence: this arg > config.defaultMaxFiles > 25). Files beyond the cap are skipped (reported in the summary). Example: 25
minScoreNoGate: if any file's mutation score is below this (0–100), the result reports gate.passed=false and lists the failing files. Never causes an error. Example: 80.
timeoutMsNoPer-file mutation-run timeout in milliseconds. Default: 300000 (5 minutes). Must be <= 2147483647 (the largest delay a timer accepts). Also clamped by whatever remains of totalTimeoutMs.
outputFormatNoOutput format. "json" (default) or "text".
totalTimeoutMsNoWall-clock budget for the WHOLE sweep in milliseconds. Default: 900000 (15 minutes). Files not started before it runs out are returned in "unaudited" rather than audited, so a large sweep still returns the ranking it produced. Must be <= 2147483647 (the largest delay a timer accepts). Example: 1800000
fileConcurrencyNoHow many files to audit in parallel. Default min(4, cpus-1). When >1, the per-file worker count is capped for every engine that has one (StrykerJS --concurrency, cargo-mutants -j, Infection --threads), and for StrykerJS each mutant's test run is additionally pinned to a single vitest worker, so those three layers multiply out to roughly the core count. Rust is the exception to watch: `cargo build`/`cargo test` parallelise internally and take no cap, so a Rust sweep runs fileConcurrency concurrent cargo builds, each of which wants its own multi-GB target directory — lower this to 1 or 2 on a memory-constrained machine. Raise with care on a workstation: a sweep is still the most resource-hungry thing this server does. Example: 4
mutatorDenylistNoStryker mutator names to exclude, applied to every TypeScript/JS file.
survivorsPerFileNoHow many top (severity-ranked, enriched) survivor groups to inline per ranked file. 0 (default) returns a scores-only leaderboard. Example: 3

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
gateNo
modeYes
noteYes
errorsYes
rankingYes
summaryYes
resourcesNo
scopeNoteNo
unauditedNo
stoppedReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv5.1.1
    • addedOutput schema / properties / ranking / items / properties / coverageNote
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / properties / coverageScope
      Added value: +{
      +  "enum": [
      +    "project",
      +    "selected"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / properties / grouped
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / resources
      Added value: +{
      +  "properties": {
      +    "availableAtStartBytes": {
      +      "type": "integer"
      +    },
      +    "fileConcurrency": {
      +      "type": "integer"
      +    },
      +    "limitBytes": {
      +      "type": "integer"
      +    },
      +    "overBudget": {
      +      "type": "boolean"
      +    },
      +    "perFileWorkers": {
      +      "type": "integer"
      +    },
      +    "source": {
      +      "enum": [
      +        "host",
      +        "cgroup",
      +        "unavailable"
      +      ],
      +      "type": "string"
      +    },
      +    "watchdogTrips": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "availableAtStartBytes",
      +    "limitBytes",
      +    "source",
      +    "fileConcurrency",
      +    "perFileWorkers",
      +    "overBudget",
      +    "watchdogTrips"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv4.2.2
    • addedOutput schema / properties / ranking / items / properties / fidelityNote
      Added value: +{
      +  "type": "string"
      +}
  3. Changed5 schema fields changedv3.0.1
    • changedInput schema / properties / fileConcurrency / description
      Previous value: -"How many files to audit in parallel. Default min(4, cpus-1). When >1, each StrykerJS run's worker count is capped, and each mutant's test run is pinned to a single vitest worker, so the three layers multiply out to roughly the core count rather than to fileConcurrency x strykerConcurrency x vitestWorkers. Raise with care on a workstation: a sweep is still the most resource-hungry thing this server does. Example: 4"New value: +"How many files to audit in parallel. Default min(4, cpus-1). When >1, the per-file worker count is capped for every engine that has one (StrykerJS --concurrency, cargo-mutants -j, Infection --threads), and for StrykerJS each mutant's test run is additionally pinned to a single vitest worker, so those three layers multiply out to roughly the core count. Rust is the exception to watch: `cargo build`/`cargo test` parallelise internally and take no cap, so a Rust sweep runs fileConcurrency concurrent cargo builds, each of which wants its own multi-GB target directory — lower this to 1 or 2 on a memory-constrained machine. Raise with care on a workstation: a sweep is still the most resource-hungry thing this server does. Example: 4"
    • changedInput schema / properties / paths / description
      Previous value: -"Workspace-relative files and/or directories to triage. Directories are recursively expanded to supported source files. Example: [\"src/utils\", \"src/index.ts\"]"New value: +"Files and/or directories to triage, resolved against the server's working directory. Directories are recursively expanded to supported source files. Each ranked row reports its `file` in that same spelling, so a row can be fed straight back to this tool or to audit_code_resilience. Example: [\"src/utils\", \"src/index.ts\"]"
    • addedOutput schema / properties / ranking / items / properties / orphanedSuppressions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / rejectedSuppressions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / relocatedSuppressions
      Added value: +{
      +  "type": "integer"
      +}
  4. Changed17 schema fields changedv1.7.0
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "paths"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "diffBase"
      +    ]
      +  }
      +]
    • changedInput schema / properties / fileConcurrency / description
      Previous value: -"How many files to audit in parallel. Default min(4, cpus-1). When >1, each StrykerJS run's worker count is capped so total CPU use stays near the core count. Example: 4"New value: +"How many files to audit in parallel. Default min(4, cpus-1). When >1, each StrykerJS run's worker count is capped, and each mutant's test run is pinned to a single vitest worker, so the three layers multiply out to roughly the core count rather than to fileConcurrency x strykerConcurrency x vitestWorkers. Raise with care on a workstation: a sweep is still the most resource-hungry thing this server does. Example: 4"
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Per-file mutation-run timeout in milliseconds. Default: 300000 (5 minutes)."New value: +"Per-file mutation-run timeout in milliseconds. Default: 300000 (5 minutes). Must be <= 2147483647 (the largest delay a timer accepts). Also clamped by whatever remains of totalTimeoutMs."
    • addedInput schema / properties / timeoutMs / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / timeoutMs / maximum
      Added value: +2147483647
    • addedInput schema / properties / totalTimeoutMs
      Added value: +{
      +  "description": "Wall-clock budget for the WHOLE sweep in milliseconds. Default: 900000 (15 minutes). Files not started before it runs out are returned in \"unaudited\" rather than audited, so a large sweep still returns the ranking it produced. Must be <= 2147483647 (the largest delay a timer accepts). Example: 1800000",
      +  "exclusiveMinimum": 0,
      +  "maximum": 2147483647,
      +  "type": "number"
      +}
    • addedOutput schema / properties / gate / properties / notGraded
      Added value: +{
      +  "properties": {
      +    "errored": {
      +      "type": "integer"
      +    },
      +    "unaudited": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "errored",
      +    "unaudited"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / gate / properties / reason
      Added value: +{
      +  "enum": [
      +    "below_threshold",
      +    "files_not_graded"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / gate / required
      Added value: +[
      +  "minScore",
      +  "passed",
      +  "failingFiles",
      +  "notGraded"
      +]
    • addedOutput schema / properties / ranking / items / properties / batchesCompleted
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / batchesPlanned
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / complete
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / ranking / items / properties / driftedSuppressions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / unverifiedSuppressions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / stoppedReason
      Added value: +{
      +  "enum": [
      +    "time_budget_exhausted"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / summary / properties / filesUnaudited
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / unaudited
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. Changed12 schema fields changedv1.2.1
    • addedOutput schema / properties / ranking / items / properties / file
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / properties / killed
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / mutationScore
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / properties / noCoverage
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / noCoverageGroups
      Added value: +{
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / ranking / items / properties / noMutableLogic
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / ranking / items / properties / scopeNote
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / properties / survived
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / survivors
      Added value: +{
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / ranking / items / properties / total
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ranking / items / properties / worstSeverity
      Added value: +{
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ranking / items / required
      Added value: +[
      +  "file",
      +  "mutationScore",
      +  "total",
      +  "killed",
      +  "survived",
      +  "noCoverage"
      +]
  6. First observedv1.1.1

TDQS

A4.7/5.0
Behavior5/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 of behavioral disclosure. It thoroughly covers recursive directory expansion, test-file skipping, parallel execution with defaults, shared wall-clock budget, unaudited-file reporting, gate behavior, resource warnings, Rust-specific caveats, and path relativity.

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?

Long but every sentence carries operational information. The core purpose is front-loaded, and the rest is organized by concern; for a 10-parameter tool with resource caveats, the length is earned.

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?

With an output schema available and a description covering purpose, routing to a sibling, behavioral traits, resource limits, and parameter interplay, an agent has everything needed to select and invoke the tool correctly. The only minor gap is no guidance on estimate_audit, which does not block correct use.

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 coverage is 100%, so the baseline is 3. The description adds meaningful cross-parameter semantics beyond the schema: fileConcurrency layers with engine worker counts, timeoutMs vs. totalTimeoutMs interaction, maxFiles precedence, diffBase+paths intersection, and the direct handoff to audit_code_resilience.

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 ('triage'), resource (files/directories, mutation scores), and output (weakest-first ranked leaderboard). It clearly distinguishes itself from audit_code_resilience by framing itself as a batch overview vs. drill-down tool.

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?

Explicitly positions the tool as a one-call fragility sweep and directs the agent to audit_code_resilience for per-mutant detail, including the file-path handoff. It does not mention the estimate_audit sibling, so exclusion guidance is not fully complete.

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