Skip to main content
Glama

List example corpus files

list_corpus_files
Read-onlyIdempotent

Discover ready-made ISO 20022 example files: market scenarios per country and rail, plus schema coverage sets. Filter by kind, country, or message type to find files before retrieval.

Instructions

List the example files pain001 ships: market scenarios and coverage sets.

Use this to discover what ready-made, validated ISO 20022 files exist
before calling ``get_corpus_file`` or ``get_corpus_provenance``. Market
files are realistic payments per country and rail (``scenario_id``
like ``gb.chaps.property-purchase``); a ``variant`` names the bank
overlay a file was built with. Coverage files exercise every element
and choice branch of one message type and carry no scenario.

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

Args:
    kind: ``market``, ``coverage`` or ``None`` for both.
    country: Optional two-letter country filter for market files.
    version: Optional message-type filter.

Returns:
    ``{"count", "files": [{"kind", "scenario_id", "version", "country",
    "family", "variant", "file"}, ...]}``, or ``{"error": ...}`` when
    the installed pain001 has no corpus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo'market' for the realistic per-country scenarios, 'coverage' for the schema coverage sets, or omit for both.
countryNoTwo-letter country code to keep one market pack only, e.g. 'GB' or 'CH'. Ignored for coverage files.
versionNoKeep only files of this message type, e.g. 'pain.001.001.09'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
errorNo
filesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.0.71
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "CorpusFileEntry": {
      +      "description": "One file of the example corpus, as the index lists it.\n\nMarket files name a scenario, a country and a rail family; coverage\nfiles carry the edition only, so those three are null for them.",
      +      "properties": {
      +        "country": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Country"
      +        },
      +        "family": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Family"
      +        },
      +        "file": {
      +          "title": "File",
      +          "type": "string"
      +        },
      +        "kind": {
      +          "title": "Kind",
      +          "type": "string"
      +        },
      +        "scenario_id": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Scenario Id"
      +        },
      +        "variant": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Variant"
      +        },
      +        "version": {
      +          "title": "Version",
      +          "type": "string"
      +        }
      +      },
      +      "title": "CorpusFileEntry",
      +      "type": "object"
      +    }
      +  },
      +  "description": "The example corpus index.",
      +  "properties": {
      +    "count": {
      +      "title": "Count",
      +      "type": "integer"
      +    },
      +    "error": {
      +      "title": "Error",
      +      "type": "string"
      +    },
      +    "files": {
      +      "items": {
      +        "$ref": "#/$defs/CorpusFileEntry"
      +      },
      +      "title": "Files",
      +      "type": "array"
      +    }
      +  },
      +  "title": "CorpusListResult",
      +  "type": "object"
      +}
  2. Addedv0.0.67

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior, so the description only needs to add context. It meaningfully explains what the two file kinds are, that coverage files carry no scenario, and that a missing corpus yields an error, all without contradicting the annotations.

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 purpose is front-loaded and the description is well organized into usage guidance, args, and returns. The delegation note and return-shape block are somewhat redundant with schema/output schema, but the overall structure remains easy to scan.

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 read-only listing tool with full schema coverage, clear filtering rules, and an output schema, the description covers the discovery workflow, file-kind distinction, error case, and parameter semantics. Nothing critical is missing for an agent to call it correctly.

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 coverage is 100% and the schema already documents kind, country, and version with examples, so the description does not need to add much. It accurately reiterates the parameters and gives useful high-level context, but it does not materially exceed what the schema already provides.

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?

Clearly identifies the resource ('example files pain001 ships') and the specific listing verb, then breaks the result down into market scenarios and coverage sets. It distinguishes itself from siblings like get_corpus_file and get_corpus_provenance by being the discovery step, so an agent can tell them apart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use this tool before calling get_corpus_file or get_corpus_provenance, which pins down the workflow position. It also gives selection context around market vs coverage files and country/version filtering, making when-to-use clear.

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