Skip to main content
Glama

topos_calculate_coverage

Read-onlyIdempotent

Calculate structural UAST coverage of a test suite over program-under-test files. Returns a CoverageResult with declaration matching and k-gram path recall.

Instructions

Measure how well a test suite exercises its program-under-test, via structural (UAST) coverage (read-only). A standalone signal, separate from the SIMPLE/COMPOSABLE/SECURE lattice; for a quality verdict use topos_evaluate_* instead. Computes UAST bipartite declaration matching and k-gram path recall. Returns a CoverageResult.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoLength of kind n-grams for path recall.
languageNoProgramming language (for parsing).python
put_filesYesPaths to the program-under-test files (relative to project root).
test_filesYesPaths to the test suite files (relative to project root).
include_unknownNoWhether to include Unknown UAST nodes in the analysis.
coverage_thresholdNoMinimum threshold for the declaration coverage policy.
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, and the description reinforces the read-only nature while adding technical detail about UAST bipartite matching and k-gram path recall, which is valuable beyond annotations.

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 sentences, each earning its place: primary purpose, sibling differentiation, and technical method. Front-loaded and no wasted words.

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?

For a measurement tool with 6 parameters and no output schema, the description covers the main purpose and technical approach, but could optionally detail the return value structure more.

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 description adds minimal extra meaning beyond the schema's built-in param descriptions, such as tying 'k' to path recall, but baseline 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 clearly states the tool measures test suite coverage via UAST, specifies it's read-only, and distinguishes it from evaluation tools like `topos_evaluate_*`, leaving no ambiguity about its purpose.

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 explicitly advises against using this tool for quality verdicts and directs to `topos_evaluate_*` instead, providing clear context on when not to use it, though it lacks explicit guidance on when to use it beyond measuring coverage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Krv-Labs/topos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server