Skip to main content
Glama

GCC e-Invoice Preflight Oracle

Validate one e-invoice (UAE PINT AE / KSA ZATCA)

validate_invoice
Read-onlyIdempotent

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.

Input Schema

NameRequiredDescriptionDefault
xmlYesThe UBL 2.1 Invoice or CreditNote XML as a string.
preflightNoAlso run the advisory Noah's Arch checks (nae-*/nksa-*: TRN/TIN consistency, emirate codes, VAT rates, totals cross-check, dates).
include_infoNoInclude info-level notes (e.g. test-data TRNs).
jurisdictionNo'ae' PINT AE Billing, 'ae-sb' PINT AE Self-Billing, 'sa' ZATCA (KSA), or 'auto' (from CustomizationID / ProfileID).auto

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, and the description adds valuable context beyond them: documents are validated in memory and never stored or logged. It also discloses the validation stages and verdict model, making the tool's behavior well understood.

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?

The description is front-loaded with the core purpose and validation scope, and it remains structured throughout. It is somewhat verbose in enumerating response fields even though an output schema exists, but the redundancy is not severe enough to impede use.

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?

Given the complexity of invoice validation, the definition is complete: it names the standards and checks, explains the verdict and findings model, and covers privacy behavior. With rich annotations, full schema coverage, and an output schema, no critical invocation context is missing.

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 the parameters are already well documented. The description adds an example using xml and jurisdiction 'auto', but it does not meaningfully explain preflight or include_info beyond what the schema provides, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: a full preflight validation of one UBL Invoice or CreditNote, including named checks and output verdicts. It is clear what the tool does, but it does not explicitly distinguish itself from siblings such as check_trn or readiness_report, leaving some routing inference to the agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear usage context: validating one invoice/credit note XML with full ruleset coverage and advisory checks. However, it does not state when not to use it or name alternatives like check_trn for single-field checks or readiness_report for broader reporting.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources