Skip to main content
Glama

Find Test Coverage Gaps

coverage_gaps
Read-onlyIdempotent

Lists production methods that no test calls directly and semantic axes declared as none, so you can find untested code and inspect test reach depth before claiming coverage.

Instructions

List what is NOT covered in a scope: 'uncovered' - production methods no test code calls directly - and 'verifiedAbsent' - semantic axes a developer explicitly declared as 'none'. find_tests_for asks the opposite question for one symbol.

Use it to find untested code before claiming coverage. THE LIST IS ONE HOP, NOT A COVERAGE MEASUREMENT: a method a test reaches THROUGH another method is listed although it is exercised. So read each entry's testReachDepth: the hops to the nearest directly called method (1 = one of those calls it), ABSENT when no test reaches the method at all. Those are the real gaps. The walk follows interface, abstract and virtual dispatch; an entry reached only that way carries viaDispatch. commandCreditRefused: a test may run its command beside another, so its missing depth is unknown. outerType: the type a nested declaring type sits in.

Returns scope, a 'note' when uncovered is non-empty or no namespace matched, symbolsScanned, uncovered and verifiedAbsent (at most 200 items each), transitivelyReached, judgedUnits, testProjectsExcluded, testFixtureTypesExcluded, reachedOnlyThroughDispatch and commandCreditRefused. uncovered is sorted by type and name, so on a large scope the cap cuts alphabetically: narrow the scope.

What counts: test code is every method of a test project, every test-attributed method and every method or constructor of a type that declares one. Only ordinary methods are judged. A constructor is a hop: new X(...) reaches the bound overload and its callees. A call from an accessor is not read. Abstract and interface declarations are excluded, and a weak test-name match does not count.

THE POPULATION IS DISCLOSED: judgedUnits is the methods the uncovered list is drawn from, out of symbolsScanned; testProjectsExcluded and testFixtureTypesExcluded count what was set aside as test code. symbolsScanned 0 means the scope matched no namespace.

Read-only. scope is 'solution' or a namespace prefix, case-insensitive, matched on segment boundaries. There is no test switch.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "coverage_gaps"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo'solution' (default) or a namespace prefix to narrow which symbols are checked.solution
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial behavior beyond them: the meaning of testReachDepth, viaDispatch, commandCreditRefused and outerType, the definition of what counts as test code, the 200-item cap with alphabetical truncation, and that symbolsScanned 0 means no namespace matched. This is the kind of semantic detail annotations cannot carry.

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

Conciseness3/5

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

The opening sentence is well front-loaded, but the body is a dense block that mixes return-field inventory, population accounting and counting rules without clear sectioning, and the all-caps emphasis and 'THE POPULATION IS DISCLOSED' passage partially restate the return-field list. Length is partly justified by tool complexity, yet the structure could be tighter.

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?

There is no output schema, so the description carries the full burden of explaining return values, and it does so thoroughly — enumerating every returned field, the cap and sort order, and the population metrics that qualify the list. For a read-only analysis tool of this complexity, nothing an agent needs to interpret results correctly is missing.

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?

With 100% schema coverage the baseline is 3, but the description adds meaning beyond the schema by specifying that scope matching is case-insensitive and matched on segment boundaries, and by stating 'There is no test switch' to rule out a filtering parameter an agent might expect. The sessionId parameter's path behavior is left entirely to the 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 states a specific verb and resource — it lists what is NOT covered in a scope — and concretely defines both result categories ('uncovered' = production methods no test code calls directly; 'verifiedAbsent' = semantic axes declared as 'none'). It explicitly distinguishes itself from the sibling find_tests_for as asking 'the opposite question for one symbol', so an agent can tell the two apart without opening either 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?

It gives clear usage context ('find untested code before claiming coverage'), names the contrasting sibling, and supplies a strong interpretive caveat ('THE LIST IS ONE HOP, NOT A COVERAGE MEASUREMENT') plus a practical directive to narrow the scope on large results. It never explicitly states when to prefer another tool for a coverage measurement, so it stops short of full when/when-not/alternatives guidance.

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