Skip to main content
Glama

explain_tests

Analyzes tests via AST to clarify purpose and strength, extract Given/When/Then, compute assert strength, link diff coverage and CDC/Pact contracts, and generate KR3a/DORA metrics.

Instructions

🔍 Explica propósito e força dos testes via AST. Extrai Given/When/Then, calcula assertStrength, relaciona com diff coverage e contracts CDC/Pact. Gera métricas para KR3a (CFR/MTTR) e DORA.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>",
      "product": "<product>"
    },
    "name": "explain_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesCaminho do repositório
failOnNoFalhar quando houver testes fracos (weak) ou nunca (none)none
formatNoFormato de saída: md (markdown) ou jsonmd
outDirNoDiretório de saída customizado (opcional, usa qa/<product>/tests/)
productYesNome do produto
baseBranchNoBranch base para diff coveragemain
minAssertsNoNúmero mínimo de asserts por teste
minDiffCoverageNoCobertura mínima do diff (%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It usefully discloses internal analysis behavior such as AST extraction, assertStrength calculation, diff coverage correlation, contract checks, and metric generation. However, it does not state whether the tool is read-only, whether it writes artifacts to outDir, what permissions are required, or what side effects occur, which are important gaps for a complex analysis tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, leading with the core purpose and then listing concrete analytical capabilities. Most sentences earn their place by naming specific outputs. It is dense with domain jargon and could be slightly clearer for an agent unfamiliar with the acronyms, but there is little wasted wording.

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 an eight-parameter tool with no annotations and no output schema, the description covers the general purpose and internal methodology reasonably well. However, it does not describe the return shape, generated artifacts, where metrics are written beyond the schema's outDir hint, or when this tool should be preferred over related siblings. These are meaningful omissions for a tool of this complexity.

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 input schema already documents all eight parameters, including enums and defaults. The description adds no parameter-specific meaning beyond the schema, so the baseline of 3 applies. There is no additional explanation of how parameters like failOn, minAsserts, or minDiffCoverage affect the analysis.

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?

The description states a specific verb and resource: it explains test purpose and strength via AST analysis. It also lists concrete outputs such as Given/When/Then extraction, assertStrength, diff coverage, CDC/Pact contracts, and DORA-related metrics. It does not explicitly differentiate itself from siblings such as run_mutation_tests or analyze, so it falls short of a 5.

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?

The description explains what the tool does but gives no explicit guidance on when to use it instead of alternatives. There are no exclusions, prerequisites, or named sibling alternatives to help an agent choose between this, run_mutation_tests, analyze, or validate. Usage is only implied by the described capabilities.

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