mcp-einvoicing-ae
v0.5.0MCP server for United Arab Emirates electronic invoicing
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_invoice_ae Generate Invoice Ae
Generate a PINT AE UBL 2.1 e-invoice XML document from structured data. Applies the correct CustomizationID (BT-24) and ProfileID (BT-23) for the selected variant. All unconditionally-mandatory PINT AE elements are emitted: ``cbc:UUID``, ``cbc:ProfileExecutionID``, per-line ``cac:ItemPriceExtension``, and ``PartyLegalEntity/CompanyID`` (``AEParty.trade_license_number``, when set). Returns a dict with: - ``xml``: the generated UBL 2.1 XML string - ``customization_id``: the CustomizationID applied (BT-24) - ``profile_id``: the ProfileID applied (BT-23)
| Parameter | Type | Description |
|---|---|---|
invoice_data * | object | Invoice fields matching the AEInvoice schema |
variant | string | PINT AE profile variant: 'billing' (default) or 'selfbilling' |
generate_tdd_ae Generate Tdd Ae
Generate a Peppol AE Tax Data Document (``pxs:TaxData``) XML from structured data. The TDD is the 5th-corner report sent to the tax authority (via the reporting service provider, C5) for each issued or received PINT AE invoice. It carries its own namespace (``urn:peppol:schema:taxdata:1.0``), a summary of the reported invoice, and the full source invoice embedded in ``pxs:SourceDocument``. This tool builds the document only: sending it is a Peppol access-point function (the TDD travels over the Peppol network in an SBDH whose Sender/Receiver match ``ReportingParty``/``ReceivingParty``). Rule…
| Parameter | Type | Description |
|---|---|---|
tdd_data * | object | Tax Data Document fields matching the AETaxDataDocument schema |
validate_invoice_ae Validate Invoice Ae
Validate a PINT AE UBL 2.1 invoice against the CEN EN16931 base Schematron. Checks the CEN EN16931 base rules (structural + arithmetic/totals, ~50 BR-* rules) via core's bundled, licensing-clean Schematron. Does NOT check the PINT-AE jurisdiction overlay (ibr-*-ae rules) — the result's metadata.scope is "en16931-base-only", and EN16931_BASE_ONLY_SCOPE_WARNING is always included. BR-CO-09 is expected to fire on every genuine AE invoice (see EN16931_BASE_KNOWN_LIMITATIONS_WARNING, always included) since UAE TRNs carry no ISO country prefix. This is not a full PINT AE conformance check; a docu…
| Parameter | Type | Description |
|---|---|---|
xml * | string | Raw PINT AE UBL 2.1 XML invoice content |
variant | string | PINT AE profile variant: 'billing' (default) or 'selfbilling' |
validate_tdd_ae Validate Tdd Ae
Validate a Peppol AE Tax Data Document (TDD). Always returns an explicit "unavailable" result — see module docstring and _TDD_VALIDATION_UNAVAILABLE for why no TDD validation is currently available.
| Parameter | Type | Description |
|---|---|---|
xml * | string | Raw Peppol AE Tax Data Document (TDD) XML content |
parse_invoice_ae Parse Invoice Ae
Parse a PINT AE UBL 2.1 XML invoice into a structured dict. Accepts a PINT AE billing or self-billing UBL 2.1 document (Invoice or CreditNote root), extracts the EN 16931 core field set plus the AE extensions (document_uuid, profile_execution_id, trade_license_number), and re-validates the merged result as an AEInvoice — so TRN format and tax-rate/category consistency are re-checked on parsed content, not just on freshly constructed invoices. Returns ``{"success": true, "invoice": {...}}`` on success, or ``{"success": false, "error": "..."}`` on parse or validation failure.
| Parameter | Type | Description |
|---|---|---|
xml_content * | string | Raw PINT AE UBL 2.1 XML invoice content |
peppol_lookup_participant Peppol Lookup Participant
Check whether a business is registered on the Peppol network. Performs a DNS-over-HTTPS U-NAPTR lookup followed by an SMP service-group request to determine registration status and the list of supported document type identifiers.
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Peppol participant ID ("<scheme>:<value>") or a bare national identifier this server knows how to adapt (e.g. a VAT number, if a national identifier adapter is configured). |
environment | string | "production" or "test". |
peppol_get_service_endpoint Peppol Get Service Endpoint
Fetch the AS4 endpoint for a Peppol participant's document type. Resolves the SMP hostname via DNS, then fetches service metadata for *document_type_id*. If the SMP returns a redirect, the result's `redirect_url` is set and `endpoint_url` is None; callers must not follow more than one redirect hop (SMP 1.4.0 §3.2).
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Peppol participant ID or adaptable national identifier. |
document_type_id | string | Peppol document type identifier URN (default: BIS Billing 3.0 invoice). |
environment | string | "production" or "test". |
resolve_peppol_dns Resolve Peppol Dns
Resolve the SMP hostname for a Peppol participant via DNS only. Performs the raw U-NAPTR (SML) lookup without fetching the SMP service group, useful for diagnosing whether a participant is registered in the SML independently of SMP reachability.
| Parameter | Type | Description |
|---|---|---|
identifier * | string | Peppol participant ID or adaptable national identifier. |
environment | string | "production" or "test". |
peppol_send Peppol Send
Send a UBL/CII invoice to a Peppol participant via AS4. Looks up the recipient's AS4 endpoint (SMP), builds the ebMS3/AS4 envelope, and transmits it using the supplied signing credentials.
| Parameter | Type | Description |
|---|---|---|
certificate_path * | string | Path to the PEM-encoded signing certificate. |
invoice_xml_base64 * | string | Base64-encoded UBL or CII invoice XML. |
private_key_path * | string | Path to the PEM-encoded private key. |
recipient_identifier * | string | Peppol participant ID or adaptable national identifier of the receiver. |
sender_id * | string | Peppol AP identifier of the sender. |
document_type_id | string | Peppol document type identifier URN (default: BIS Billing 3.0 invoice). |
environment | string | "production" or "test". |
private_key_password | string | Optional password for the private key. |
list_participant_id_schemes List Participant Id Schemes
List Peppol participant identifier (ICD) schemes from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR to point at a local copy of the eDEC "Participant Identifier Schemes" GeneriCode export (not bundled with this package, no confirmed redistribution rights, see `mcp_einvoicing_core.peppol.codelists` module docstring).
| Parameter | Type | Description |
|---|---|---|
active_only | boolean | When True (default), omit deprecated/removed entries. |
list_document_type_ids List Document Type Ids
List Peppol document type identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
| Parameter | Type | Description |
|---|---|---|
active_only | boolean | When True (default), omit deprecated/removed entries. |
list_process_ids List Process Ids
List Peppol process identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
| Parameter | Type | Description |
|---|---|---|
active_only | boolean | When True (default), omit deprecated/removed entries. |
list_spis_use_case_ids List Spis Use Case Ids
List Peppol SPIS use case identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
| Parameter | Type | Description |
|---|---|---|
active_only | boolean | When True (default), omit deprecated/removed entries. |
check_document_type_id_in_codelist Check Document Type Id In Codelist
Check whether a (scheme, value) pair is a recognized Peppol document type identifier. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`). Searches all entries regardless of state, so a historical (deprecated or removed) document type is still reported as found.
| Parameter | Type | Description |
|---|---|---|
scheme * | string | |
value * | string |
check_process_id_in_codelist Check Process Id In Codelist
Check whether a (scheme, value) pair is a recognized Peppol process identifier. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
| Parameter | Type | Description |
|---|---|---|
scheme * | string | |
value * | string |
check_participant_id_scheme_in_codelist Check Participant Id Scheme In Codelist
Check whether a 4-digit ISO 6523 ICD code (e.g. "0208") is a recognized Peppol scheme. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
| Parameter | Type | Description |
|---|---|---|
icd * | string |
get_peppol_codelist_version Get Peppol Codelist Version
Report the OpenPeppol eDEC code list release version(s) currently configured locally.
peppol_directory_search Peppol Directory Search
Search the Peppol Directory for registered participants. Public, unauthenticated search (no relation to SMP lookup). At least one of q/participant/name/country/doctype must be supplied.
| Parameter | Type | Description |
|---|---|---|
country | Exact match on ISO 3166-2 country code. | |
doctype | Exact match on a full document type identifier URN. | |
environment | string | "production" or "test". |
name | Partial match on business entity name (min. 3 characters). | |
participant | Exact match on a scheme-qualified participant ID (e.g. "iso6523-actorid-upis::0208:0123456789"). | |
q | General purpose query term, matched across all fields. | |
result_page_count | integer | Results per page. |
result_page_index | integer | 0-based result page index. |