Skip to main content
Glama

Validate against scheme rulebook

validate_payment_scheme
Read-onlyIdempotent

Validate payment records against scheme-specific rulebook profiles like SEPA SCT or SDD, enforcing business rules not covered by schema validation. Returns 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 and idempotentHint. The description adds that validation returns a structured violations object with specific keys and mentions delegation to a function, providing useful behavioral context 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.

Conciseness4/5

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

Well-structured with clear paragraphs. Front-loads purpose and usage. A bit verbose with the function reference but overall efficient for the detail 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?

Given the tool's simplicity (2 params, no nested objects, no output schema) and rich annotations, the description fully covers purpose, usage, return format, and supported profiles. No gaps remain.

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?

Schema coverage is 100% with descriptions for both parameters. The description adds the list of supported profiles and the structure of the return value (including violations keys), compensating for the missing output 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 clearly states the tool validates records against a payment-scheme rulebook (e.g., SEPA) and distinguishes it from sibling 'validate_records' by specifying it enforces scheme-specific business rules not covered by JSON-Schema validation.

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?

Explicitly instructs to use after 'validate_records' and contrasts the two tools. No explicit when-not-to-use, but the context is clear enough.

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