GCC e-Invoice Preflight Oracle
Validate UAE PINT AE and Saudi ZATCA e-invoices: UBL, official Schematron, QR, fix hints.
我该使用它吗
质量与安全性
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"einvoice-preflight": {
"url": "https://einvoice.noahsarch.tech/mcp"
}
}
}远程端点
https://einvoice.noahsarch.tech/mcpstreamable-http它能做什么
工具清单
工具(7)
🟢validate_invoice(xml, jurisdiction, preflight, include_info)
Full preflight of one UBL Invoice or CreditNote: XML well-formedness, UBL 2.1 XSD, the official PINT AE Schematron (≈300 rules incl. the UAE jurisdiction overlay) or the ZATCA pre-check, plus advisory cross-checks. Returns a verdict and every finding with rule id, severity, fields, location and fix hint. Example: xml '<Invoice …>', jurisdiction 'auto'. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"xml": {
"description": "The UBL 2.1 Invoice or CreditNote XML as a string.",
"title": "Xml",
"type": "string"
},
"jurisdiction": {
"default": "auto",
"description": "'ae' PINT AE Billing, 'ae-sb' PINT AE Self-Billing, 'sa' ZATCA (KSA), or 'auto' (from CustomizationID / ProfileID).",
"enum": [
"auto",
"ae",
"ae-sb",
"sa"
],
"title": "Jurisdiction",
"type": "string"
},
"preflight": {
"default": true,
"description": "Also run the advisory Noah's Arch checks (nae-*/nksa-*: TRN/TIN consistency, emirate codes, VAT rates, totals cross-check, dates).",
"title": "Preflight",
"type": "boolean"
},
"include_info": {
"default": false,
"description": "Include info-level notes (e.g. test-data TRNs).",
"title": "Include Info",
"type": "boolean"
}
},
"required": [
"xml"
],
"title": "validate_invoiceArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "validate_invoiceDictOutput"
}🟢readiness_report(documents, jurisdiction, preflight, format)
Batch preflight for a go-live check or an ERP regression suite: per-document verdicts, readiness percentage, the most frequent rejection rules across the batch, optional printable HTML. Charged per document. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"documents": {
"description": "Up to 100 documents.",
"items": {
"$ref": "#/$defs/DocumentIn"
},
"title": "Documents",
"type": "array"
},
"jurisdiction": {
"default": "auto",
"description": "",
"enum": [
"auto",
"ae",
"ae-sb",
"sa"
],
"title": "Jurisdiction",
"type": "string"
},
"preflight": {
"default": true,
"description": "",
"title": "Preflight",
"type": "boolean"
},
"format": {
"default": "json",
"description": "'html' adds a self-contained printable report in result.html.",
"enum": [
"json",
"html"
],
"title": "Format",
"type": "string"
}
},
"required": [
"documents"
],
"$defs": {
"DocumentIn": {
"additionalProperties": false,
"properties": {
"name": {
"anyOf": [
{
"maxLength": 200,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label for the row (file name, invoice number).",
"title": "Name"
},
"xml": {
"maxLength": 3000000,
"minLength": 20,
"title": "Xml",
"type": "string"
}
},
"required": [
"xml"
],
"title": "DocumentIn",
"type": "object"
}
},
"title": "readiness_reportArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "readiness_reportDictOutput"
}🟢extract_summary(xml)
Seller/buyer (names, TRN, endpoint, legal registration, emirate), dates, currency, totals, VAT breakdown, line count, payment means, attachments and the detected rule set — without validating. Free. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"xml": {
"description": "",
"title": "Xml",
"type": "string"
}
},
"required": [
"xml"
],
"title": "extract_summaryArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "extract_summaryDictOutput"
}🟢list_rules(jurisdiction, severity, contains)
Rule ids, severities and texts from the installed PINT AE Schematron (shared PINT rules and the -ae jurisdiction rules), filterable by severity or text, with fix hints where we have them. Free. Example: contains 'TaxPointDate'. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"jurisdiction": {
"default": "ae",
"description": "",
"enum": [
"ae",
"ae-sb"
],
"title": "Jurisdiction",
"type": "string"
},
"severity": {
"anyOf": [
{
"enum": [
"fatal",
"warning"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "",
"title": "Severity"
},
"contains": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter by text, e.g. 'TaxPointDate', 'ibr-co', 'BTAE-16'.",
"title": "Contains"
}
},
"title": "list_rulesArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "list_rulesDictOutput"
}🟢check_trn(trn)
Format check of a UAE Tax Registration Number (15 digits) and derivation of the TIN / Peppol participant identifier (scheme 0235 = first 10 digits). Free. Example: trn '100 1234 5670 0003'. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"trn": {
"description": "UAE Tax Registration Number as printed (spaces/dashes allowed).",
"title": "Trn",
"type": "string"
}
},
"required": [
"trn"
],
"title": "check_trnArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "check_trnDictOutput"
}🟢zatca_qr_decode(qr)
Decode the base64 TLV of a Saudi e-invoice QR into seller name, VAT number, timestamp, totals, hash, signature and key tags, with phase detection and format issues. Free. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"qr": {
"description": "Base64 TLV content of a ZATCA QR code.",
"title": "Qr",
"type": "string"
}
},
"required": [
"qr"
],
"title": "zatca_qr_decodeArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "zatca_qr_decodeDictOutput"
}🟢zatca_qr_encode(seller_name, vat_number, timestamp, total_with_vat, vat_total, ...)
Encode the five phase-1 fields (plus optional phase-2 hash/signature/key tags) into the base64 TLV string that goes into the QR image and the UBL QR reference. Free. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
输入模式
{
"type": "object",
"properties": {
"seller_name": {
"description": "",
"title": "Seller Name",
"type": "string"
},
"vat_number": {
"description": "KSA VAT number: 15 digits, starts and ends with 3.",
"title": "Vat Number",
"type": "string"
},
"timestamp": {
"description": "ISO 8601, e.g. 2026-10-31T14:05:00Z",
"title": "Timestamp",
"type": "string"
},
"total_with_vat": {
"description": "e.g. '1150.00'",
"title": "Total With Vat",
"type": "string"
},
"vat_total": {
"description": "e.g. '150.00'",
"title": "Vat Total",
"type": "string"
},
"invoice_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Base64 SHA-256 of the invoice (phase 2).",
"title": "Invoice Hash"
},
"ecdsa_signature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Base64 (phase 2).",
"title": "Ecdsa Signature"
},
"public_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Base64 (phase 2).",
"title": "Public Key"
},
"certificate_signature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Base64 (phase 2, simplified invoices).",
"title": "Certificate Signature"
}
},
"required": [
"seller_name",
"vat_number",
"timestamp",
"total_with_vat",
"vat_total"
],
"title": "zatca_qr_encodeArguments"
}输出模式
{
"type": "object",
"additionalProperties": true,
"title": "zatca_qr_encodeDictOutput"
}社区
证据