Skip to main content
Glama

TestHeal

The missing reliability layer for AI coding agents — zero API cost.

Gives Claude Code, Cursor, Gemini CLI, OpenCode and others a disciplined protocol for diagnosing and fixing failing tests. Uses the agent's own model. No API keys. No extra cost.


Easiest ways to connect (pick one)

1. Claude Code — one command

claude mcp add test-heal -- npx -y github:webscout9-png/test-heal

Verify:

claude mcp list

Remove later:

claude mcp remove test-heal

2. Any agent — one command with add-mcp

npx add-mcp github:webscout9-png/test-heal -y

3. Cursor — paste this config

Put in ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "test-heal": {
      "command": "npx",
      "args": ["-y", "github:webscout9-png/test-heal"]
    }
  }
}

Restart Cursor.


4. From source

git clone https://github.com/webscout9-png/test-heal.git
cd test-heal
npm install
npm run build

Then:

{
  "mcpServers": {
    "test-heal": {
      "command": "node",
      "args": ["/absolute/path/to/test-heal/bin/run.js"]
    }
  }
}

Related MCP server: MCP Workflow Engine

What was fixed (v0.3.3)

Root cause of connection failures:
The package bin pointed at dist/index.js, but dist/ is not committed to the repo. When agents ran npx github:webscout9-png/test-heal, the entry file was missing and the server failed to start.

Fix:
A small pure-JS launcher (bin/run.js) now:

  1. Uses dist/index.js if it exists (after a local build)

  2. Otherwise runs the TypeScript source with tsx (works for npx github: installs)

No pre-build required to connect the server to an agent.


Tools

Tool

When to use

diagnose_test_failure

First step when a test fails

propose_minimal_fix

After diagnosis — forces a tiny, safe patch

assess_fix_safety

Before applying any non-trivial fix


License

MIT

Available Tools

3 tools
assess_fix_safetyA

Evaluate whether a proposed patch is likely to introduce regressions. Returns risk level, potential side effects, and a clear recommendation. Use before applying any non-trivial fix.

ParametersJSON Schema
NameRequiredDescriptionDefault
patchYesThe unified diff to evaluate
languageNo
diagnosisNo
test_outputNo
source_filesYes

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description must carry the behavioral transparency burden. It discloses what the tool returns and strongly implies through 'Evaluate' and 'Use before applying' that it is an analysis-only operation. However, it never explicitly states that the patch is not applied or that no code is modified, leaving a meaningful behavioral trait implicit rather than stated.

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 three short, purposeful sentences: it front-loads the core purpose, then the output, then the usage condition. Every sentence contributes new information and there is no filler.

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

Completeness2/5

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

The tool is moderately complex with five parameters, nested objects, no annotations, low schema coverage, and no output schema, yet the description does not mention the required source_files parameter or when to provide optional diagnosis/test_output/language. It only vaguely characterizes the return value, leaving too much for an agent to infer.

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?

Schema description coverage is only 20%, so the description needs to compensate. 'Proposed patch' maps to the patch parameter, but there is no explanation of the required source_files array or the optional language, diagnosis, and test_output inputs. An agent gets little parameter-level guidance beyond the raw schema.

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 opens with a specific verb ('Evaluate'), a clear resource ('proposed patch'), and the exact question it answers ('likely to introduce regressions'). The mention of risk level, side effects, and recommendation makes the tool's role unmistakable and clearly different from the sibling tools diagnose_test_failure and propose_minimal_fix, even without naming them.

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 before applying any non-trivial fix' gives a clear temporal trigger and workflow context. It does not explicitly state when not to use it or contrast it with the sibling tools, so it is clear guidance but lacks exclusions or alternatives.

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

diagnose_test_failureA

Perform deep root-cause analysis of a failing test. Returns ranked hypotheses with confidence scores, evidence, and precise locations. Call this first when a test fails. Prefer this over guessing from the raw test output.

ParametersJSON Schema
NameRequiredDescriptionDefault
git_diffNoOptional recent git diff that may have introduced the failure
languageNoProgramming language, e.g. typescript, python, go, java
frameworkNoTest framework, e.g. jest, vitest, pytest, junit, go test
test_outputYesFull test failure output including stack traces, assertion messages, and any relevant logs
source_filesYesRelevant source files that may be involved in the failure. Prefer including the test file + the implementation under test.
additional_contextNoAny extra context the agent has about the failure

TDQS

A4/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 of behavioral disclosure. It does not explicitly state whether the tool is read-only or has side effects, though 'root-cause analysis' implies non-mutating. It also doesn't mention authentication, rate limits, or error behavior. However, the output description (ranked hypotheses) gives some transparency about what to expect.

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 three sentences with no fluff. The main purpose is front-loaded, followed by the output type and a clear usage directive. Every sentence earns its place, and it is efficiently structured.

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?

Given the complexity (6 params, 2 required) and no output schema, the description adequately covers the essential behavior and output. It explains what the tool returns (ranked hypotheses with confidence scores, evidence, locations) and when to use it. It could mention edge cases like empty results or specific input requirements, but the schema already covers input constraints. Overall, it's sufficient 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.

Parameters3/5

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

Schema description coverage is 100%, meaning every parameter has a description in the schema itself. The tool description adds no parameter-specific details beyond that. Since the schema already documents each parameter thoroughly, the description doesn't need to repeat it. Baseline of 3 is appropriate.

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 ('Perform deep root-cause analysis') and resource ('a failing test'), and clearly distinguishes its output (ranked hypotheses with confidence scores, evidence, locations). This differentiates it from siblings like propose_minimal_fix and assess_fix_safety, which focus on fixing and safety assessment respectively.

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?

The description explicitly says 'Call this first when a test fails' and contrasts with 'guessing from the raw test output', giving clear when-to-use guidance. It doesn't explicitly name alternatives or when-not-to-use, but the directive 'Call this first' is strong. The sibling tool names are not mentioned, but the context implies this is the diagnostic first step.

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

propose_minimal_fixA

Generate the smallest possible high-confidence patch for a diagnosed root cause. Always prefer minimal edits. Returns a unified diff, explanation, confidence, and risk level. Call diagnose_test_failure first when possible.

ParametersJSON Schema
NameRequiredDescriptionDefault
git_diffNo
languageNo
diagnosisNoOutput from a previous diagnose_test_failure call. Strongly recommended.
frameworkNo
constraintsNoAny constraints the agent must respect (e.g. 'do not change public API', 'keep existing test structure')
test_outputYes
source_filesYes
root_cause_idNoWhich ranked root cause to fix (1-based). Defaults to 1.

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the algorithm's preference ('Always prefer minimal edits'), the nature of the output (unified diff, explanation, confidence, risk level), and the contextual requirement of a diagnosed root cause. It does not explicitly state that the tool only proposes a patch and does not modify files, but the name and 'returns a diff' strongly imply that.

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 three short sentences with no filler. It front-loads the core behavior, then the policy, then the return format, and finally the workflow prerequisite. Every sentence earns its place.

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

Completeness2/5

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

The tool is complex: 8 parameters, nested objects, no output schema, and sparse schema descriptions. The description gives a helpful workflow hint and lists returned fields, but it does not explain how to construct the required inputs, how diagnosis and root_cause_id interact, what constraints/git_diff are for, or what the risk level output looks like. Significant gaps remain for an agent to invoke this correctly.

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?

Schema description coverage is only 38%, so the description needed to compensate, but it does not explain the roles of test_output, source_files, git_diff, language, framework, constraints, or root_cause_id. The only semantic hint is that a diagnosis should precede the call, which weakly maps to the `diagnosis` parameter. This is insufficient for an 8-parameter tool with nested objects.

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 opens with a specific verb and resource: 'Generate the smallest possible high-confidence patch for a diagnosed root cause.' It also states the return payload (unified diff, explanation, confidence, risk level) and the core policy ('Always prefer minimal edits'), which clearly distinguishes it from the sibling tools diagnose_test_failure and assess_fix_safety.

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?

The description explicitly instructs 'Call diagnose_test_failure first when possible', giving a clear workflow prerequisite and indicating this tool consumes an earlier diagnosis. It does not mention assess_fix_safety or provide exclusion criteria, but the sequencing guidance is concrete and useful.

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. 3 tool updatesv0.1.0
    • First observedassess_fix_safety
    • First observeddiagnose_test_failure
    • First observedpropose_minimal_fix

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool handles a distinct stage of a clear pipeline: diagnose, propose, assess. There is no overlap or ambiguity about which tool to call at each step.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: diagnose_test_failure, propose_minimal_fix, assess_fix_safety. The verbs clearly indicate distinct actions and the nouns describe the target artifact.

Tool Count4/5

Three tools is on the smaller side, but each covers a necessary phase of the test-fix workflow. The count is reasonable for a focused MCP server, though slightly thin.

Completeness4/5

The tools cover the core diagnose-propose-assess lifecycle well. A minor gap is the lack of an explicit tool to apply or commit the fix, but that may be intentionally outside the server's scope.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers