Validate XML against XSD
validate_xmlValidates a raw ISO 20022 pacs XML document against the bundled XSD schema for a specified message type, returning whether the document is valid.
Instructions
Validate a raw XML string against a message type's bundled XSD.
Use this to check an externally produced XML document against the official
ISO 20022 schema. To generate a document that is already XSD-validated,
use ``generate_message`` instead.
Returns ``{"message_type": str, "is_valid": bool}``, or ``{"error":
...}`` for an unsupported type or DTD entities; a bad year is invalid.
Args:
message_type: A supported ISO 20022 pacs message type.
xml: The raw XML document to validate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"message_type": "<message_type>",
"xml": "<xml>"
},
"name": "validate_xml"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | A raw ISO 20022 XML document to validate against the bundled XSD schema for the given message type. | |
| message_type | Yes | A supported ISO 20022 pacs message type, e.g. 'pacs.008.001.08' FI-to-FI Customer Credit Transfer. Must be exactly one of: 'pacs.002.001.12', 'pacs.003.001.09', 'pacs.004.001.11', 'pacs.007.001.11', 'pacs.008.001.01', 'pacs.008.001.02', 'pacs.008.001.03', 'pacs.008.001.04', 'pacs.008.001.05', 'pacs.008.001.06', 'pacs.008.001.07', 'pacs.008.001.08', 'pacs.008.001.09', 'pacs.008.001.10', 'pacs.008.001.11', 'pacs.008.001.12', 'pacs.008.001.13', 'pacs.009.001.10', 'pacs.010.001.05', 'pacs.028.001.05' (see list_message_types). |