Skip to main content
Glama
sebastienrousseau

camt-exceptions

validate_xml

Read-onlyIdempotent

Diagnose schema errors by validating raw ISO 20022 E&I XML against bundled XSD schemas; returns validation status and detailed violation diagnostics.

Instructions

Validate raw ISO 20022 E&I XML against bundled XSD schemas.

Purpose: Validates an XML string against the official bundled XSD schema for the specified E&I message type, returning validation status and detailed schema violation diagnostics.

When to use:

  • When inspecting received or pre-generated ISO 20022 E&I XML before ingesting or routing.

  • When diagnosing schema structural, datatype, or constraint errors in message payloads.

When NOT to use:

  • Do NOT use for payment initiation (pain) or statement (camt.053) documents.

  • Do NOT pass unparseable binary content; requires valid XML text.

Behavioral transparency: Pure, in-memory schema validation using local bundled XSDs; zero network access or side effects.

Input Schema

NameRequiredDescriptionDefault
xmlYesRaw ISO 20022 XML to validate.
message_typeYesAn E&I message type, e.g. 'camt.056.001.12' (see list_message_types).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.15

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-open-world, non-destructive. The description adds genuinely new context: pure in-memory validation with locally bundled XSDs and zero network access or side effects. It stops short of describing diagnostics detail, but the output schema covers returns.

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?

Labeled sections (Purpose, When to use, When NOT to use, Behavioral transparency) make it scannable and front-loaded, though the header scaffolding is slightly heavier than strictly needed for a two-parameter tool.

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?

An output schema exists so return values need not be explained. With safety covered by annotations, parameters by the schema, and scope/limits by the description, an agent has everything needed to invoke 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 description coverage is 100%, so both parameters are already documented, and the description adds no format or syntax detail beyond what the schema states. Baseline 3 applies when the schema carries the parameter burden.

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?

States a specific verb+resource+scope: validating raw ISO 20022 E&I XML against bundled XSD schemas. Clearly distinguishes itself from siblings like generate_message and list_message_types, which produce or enumerate rather than validate.

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?

Explicit when-to-use (pre-ingest inspection, diagnosing structural/datatype/constraint errors) and when-not-to-use (pain/camt.053 documents, binary content). Also points to list_message_types for valid message types, giving the agent a routing path to the sibling.

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