Skip to main content
Glama

Validate against scheme rulebook

validate_payment_scheme
Read-onlyIdempotent

Enforce payment-scheme business rules such as SEPA field lengths, currency, and BIC constraints on validated records. Returns structured violations with remediation guidance.

Instructions

Validate records against a payment-scheme rulebook (e.g. SEPA).

Use this after ``validate_records`` to enforce scheme-specific business
rules (SEPA field lengths, allowed characters, currency/BIC constraints)
that JSON-Schema validation alone does not cover. ``validate_records``
checks structural shape; this checks rulebook compliance for one profile.

Delegates to :func:`pain001.validate_scheme`. Supported profiles:
``sepa-sct``, ``sepa-sdd``, ``sepa-inst``, ``xborder-ct``.

Args:
    records: Payment records as a list of flat dicts.
    profile: The scheme profile name.

Returns:
    ``{"profile", "is_valid", "violations": [...]}`` with structured
    ``violations`` (each with ``rule``, ``severity``, ``field``,
    ``message``, ``remediation`` keys), or ``{"error": ...}`` for an
    unknown profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoThe payment-scheme rulebook profile to enforce. One of 'sepa-sct', 'sepa-sdd', 'sepa-inst', or 'xborder-ct'. Defaults to 'sepa-sct'.sepa-sct
recordsYesPayment records as a list of flat dicts (field name → value) to check against the scheme rulebook.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotent. Description adds context about delegating to Python function, return structure (violations with keys), and error handling for unknown profiles. No contradictions. Bar lowered by annotations; description adds useful operational details.

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?

Description is well-structured with purpose first, then usage guidance, then argument details, then returns. Some redundancy (e.g., 'Delegates to' line is internal). Could be slightly shorter but overall concise for the information provided.

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?

With no output schema, description fully explains return structure (dict with profile, is_valid, violations). Also clarifies relationship to sibling tool. Two parameters are sufficiently documented. Complete for the tool's 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 coverage is 100%, so baseline 3. Description lists parameters and mentions default profile, but schema descriptions already cover allowed values and types. Minimal added meaning beyond 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?

Clear verb-resource combination: 'Validate records against a payment-scheme rulebook' with specific examples (SEPA). Explicitly distinguishes from sibling 'validate_records' by contrasting structural vs. rulebook compliance. Lists supported profiles.

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 states when to use: 'after validate_records to enforce scheme-specific business rules'. Explains what validate_records covers versus this tool. Provides clear ordering guidance.

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/sebastienrousseau/pain001-mcp'

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