Skip to main content
Glama

Check a test fix (heal guard)

check-test-change
Read-onlyIdempotent

Checks changed Playwright tests against a git ref or proposed file to block weakened assertions, skipped tests, and .only, and warn on weaker matchers or force flags before committing.

Instructions

Heal guard: check that changed tests were not made to pass by checking less. Compares spec files with a git ref (default HEAD = uncommitted changes) or one proposed file (file + after). BLOCK on deleted assertions, skipped/removed tests or .only; WARN on weaker matchers, waitForTimeout, force: true, swallowed errors, raised timeouts or retries. Run it after any AI fix, before committing.

Input Schema

NameRequiredDescriptionDefault
baseNoGit ref to compare with: 'HEAD' (default: uncommitted changes), 'origin/main' (the whole branch)
fileNoWith after: the spec file a fix would change
afterNoWith file: the fix's full new file content, checked before it is written
filesNoOnly these files (default: every changed spec file and playwright config)
projectRootNoProject directory (default: server root)

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the call failed (see error) or the tests it ran failed
errorNo
totalNo
statusNo
findingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered; the description adds genuine value by disclosing the outcome model — hard BLOCK on deleted assertions, skipped/removed tests and .only, versus WARN on weaker matchers, waitForTimeout, force: true, swallowed errors and raised timeouts/retries. It does not say what the response contains, but an output schema exists to cover 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?

Three tightly packed sentences, front-loaded with the guard's purpose before modes and severity rules. The BLOCK/WARN enumeration is dense but every item carries decision-relevant information, and nothing is redundant.

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 full schema coverage and the presence of an output schema, the description supplies everything an agent needs to decide to call it: purpose, trigger, mode selection and severity semantics. Minor gap: it never clarifies scope boundaries (which files are scanned by default beyond spec files and playwright config) or whether projectRoot affects that scope.

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%, so the schema already explains base, file, after, files and projectRoot. The description only adds the framing that 'file + after' is a paired mode and that base defaults to uncommitted changes, both of which are already in the schema text — baseline 3 is correct.

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 and resource ('check that changed tests were not made to pass by checking less') and immediately frames it as a guard against a concrete failure mode, which distinguishes it from siblings like suggest-fix or audit-tests. The two comparison modes (git ref vs. proposed file) further sharpen what the tool actually does.

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 an explicit trigger: 'Run it after any AI fix, before committing,' plus mode selection guidance ('base' defaulting to HEAD for uncommitted changes, or file + after for a proposed fix). It does not name a sibling alternative or state when not to use it, so it falls 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.