validate_invoice_sg
Validate UBL 2.1 XML invoices against IRAS's C5 acceptance-layer Schematron. Catches missing buyer/seller UEN and other IRAS rejections before submission.
Instructions
Validate a UBL 2.1 XML invoice against IRAS's C5 acceptance-layer Schematron.
Runs IRAS's own C5 acceptance layer (checks documents that IRAS
itself would still reject, e.g. a missing buyer/seller UEN). The CEN
EN16931 base ruleset, PINT-SG's own jurisdiction overlay, and SG
Peppol BIS Billing 3.0 are NOT checked — see scope and the
EN16931-BASE-UNAVAILABLE warning in the result, and
validators/schematron.py's module docstring for why (SGInvoice's GST
category codes have no sourced crosswalk to the UNCL5305 code list
the base ruleset requires; tracked as
[CORE-EN16931-BASE-SG-CROSSWALK-1] in context-library/roadmap-2026.md).
Requires the optional xslt2 extra (pip install mcp-invoicenow-sg[xslt2]) — the bundled stylesheet needs XSLT 2.0.
If missing, returns level="unavailable".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml_content | Yes | UBL 2.1 Invoice or CreditNote XML content to validate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||