Skip to main content
Glama

Get schema coverage report

get_corpus_coverage
Read-onlyIdempotent

Check schema coverage for a message version to verify coverage files reach every element path and choice branch before relying on them for parser or mapping tests.

Instructions

Return the schema coverage verdict of one message type's coverage set.

Use this to check that the shipped coverage files reach every element
path and choice branch of an edition's XSD before relying on them to
smoke a parser or a mapping.

Delegates to :func:`pain001.corpus.coverage_report`.

Args:
    version: The message type.

Returns:
    The ``coverage.json`` content (path and branch counts and
    percentages, completeness, missing and exempt lists), or
    ``{"error": ...}`` when the edition has no set or there is no
    corpus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionYesThe message type, e.g. 'pain.001.001.13'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
filesNo
pathsNo
exemptNo
sourcesNo
unknownNo
branchesNo
completeNo
message_typeNo
missing_pathsNo
missing_branchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.0.71
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "CoverageCount": {
      +      "description": "Declared schema elements, how many the corpus hits, as a percentage.",
      +      "properties": {
      +        "declared": {
      +          "title": "Declared",
      +          "type": "integer"
      +        },
      +        "hit": {
      +          "title": "Hit",
      +          "type": "integer"
      +        },
      +        "percent": {
      +          "title": "Percent",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "declared",
      +        "hit",
      +        "percent"
      +      ],
      +      "title": "CoverageCount",
      +      "type": "object"
      +    }
      +  },
      +  "description": "Schema-path coverage of the corpus for one message edition.",
      +  "properties": {
      +    "branches": {
      +      "$ref": "#/$defs/CoverageCount"
      +    },
      +    "complete": {
      +      "title": "Complete",
      +      "type": "boolean"
      +    },
      +    "error": {
      +      "title": "Error",
      +      "type": "string"
      +    },
      +    "exempt": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Exempt",
      +      "type": "array"
      +    },
      +    "files": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Files",
      +      "type": "array"
      +    },
      +    "message_type": {
      +      "title": "Message Type",
      +      "type": "string"
      +    },
      +    "missing_branches": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Missing Branches",
      +      "type": "array"
      +    },
      +    "missing_paths": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Missing Paths",
      +      "type": "array"
      +    },
      +    "paths": {
      +      "$ref": "#/$defs/CoverageCount"
      +    },
      +    "sources": {
      +      "items": {},
      +      "title": "Sources",
      +      "type": "array"
      +    },
      +    "unknown": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Unknown",
      +      "type": "array"
      +    }
      +  },
      +  "title": "CorpusCoverageResult",
      +  "type": "object"
      +}
  2. Addedv0.0.67

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds useful behavioral detail beyond annotations: it delegates to pain001.corpus.coverage_report and explicitly describes the error return shape when no coverage set or corpus exists. No contradiction with 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?

The description is well-structured and front-loaded: purpose, usage context, delegation, then Args/Returns. Every sentence contributes useful information, and there is no fluff or repetition of schema details.

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?

For a single-parameter tool with a rich output schema and strong annotations, the description covers purpose, usage context, return contents, and error behavior. Nothing an agent needs to decide whether and how to call this tool is missing.

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% and the schema already documents version as 'The message type, e.g. pain.001.001.13.' The description's Args section merely repeats 'version: The message type' without adding format constraints, defaults, or additional meaning. Baseline 3 is appropriate since the schema carries the semantic weight.

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: 'Return the schema coverage verdict of one message type's coverage set.' It clearly distinguishes this from sibling corpus tools like get_corpus_file and get_corpus_provenance by focusing on coverage verdicts rather than file contents or provenance.

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 gives a clear use case: 'Use this to check that the shipped coverage files reach every element path and choice branch of an edition's XSD before relying on them to smoke a parser or a mapping.' It does not explicitly name alternatives or when not to use it, but the context is strong enough for an agent to select it appropriately.

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