Skip to main content
Glama

πŸ‡ΈπŸ‡¦ ZATCA MCP

AI-native Saudi e-invoicing β€” generate ZATCA-compliant invoices from natural language.

Python 3.10+ License: Apache 2.0 CI Tests: 127 passing MCP Compatible ZATCA Phase 1 + 2


Why ZATCA MCP?

Saudi Arabia's ZATCA mandate requires all businesses to issue structured electronic invoices β€” Phase 1 (generation) since December 2021, Phase 2 (integration) rolling out across taxpayer waves through 2025. This is a cornerstone of Vision 2030 digital transformation.

The problem: no open-source, AI-native tooling exists for ZATCA e-invoicing. Businesses either pay for proprietary ERP plugins or build compliance from scratch.

This project: the first open-source MCP server for Saudi e-invoicing β€” letting AI agents like Claude generate, validate, and manage ZATCA-compliant invoices through natural conversation.

Related MCP server: einvoice-mcp

Features

  • 9 MCP Tools β€” generate, sign, validate, submit invoices + QR codes, CSR, compliance checks, HTML render

  • 3 MCP Resources β€” validation rules, invoice types, sample invoice for AI reference

  • 3 MCP Prompts β€” guided workflows for creating invoices, validating, and credit/debit notes

  • UBL 2.1 XML β€” full namespace-compliant invoice generation per OASIS standard

  • 16-Rule Validation Engine β€” BR-01 through BR-16 business rule checks

  • XAdES-BES Digital Signing β€” ECDSA secp256k1 signatures with certificate embedding

  • ZATCA API Integration β€” async client for compliance, reporting, and clearance endpoints

  • Credit/Debit Notes β€” type codes 381/383 with BillingReference and InstructionNote

  • TLV QR Encoding β€” Phase 1 + Phase 2 tag support (tags 1-8, cryptographic data)

  • Fikra CLI β€” Claude Code-style conversational agent with HTML invoice output

  • 127 Tests β€” unit, integration, signing, API client, resources/prompts, and edge-case coverage

  • CI/CD Pipeline β€” ruff + mypy + pytest across Python 3.10/3.11/3.12 + Phase 2 job

  • Arabic Support β€” full UTF-8 handling for seller/buyer names and addresses

  • Decimal Precision β€” Decimal with ROUND_HALF_UP for all financial math

  • Multi-Rate VAT β€” per-line-item VAT rates (default 15%)

Architecture

graph TD
    subgraph Clients
        A[Claude Desktop]
        B[Claude Code]
        C[Fikra CLI]
    end

    subgraph MCP Server
        D[generate_invoice]
        E[generate_qr_code]
        F[validate_invoice]
        G[decode_qr]
        D2[generate_csr]
        D3[sign_invoice]
        D4[submit_invoice]
        D5[check_compliance]
    end

    subgraph Processing Engine
        H[XML Builder<br/>UBL 2.1]
        I[Validation Engine<br/>16 Business Rules]
        J[TLV Encoder<br/>QR Phase 1 + 2]
        S[Signing Engine<br/>XAdES-BES]
        API[ZATCA API Client<br/>httpx async]
    end

    A -- MCP Protocol --> D
    B -- MCP Protocol --> E
    A -- MCP Protocol --> F
    B -- MCP Protocol --> G

    C -- Direct Call --> H
    C -- Direct Call --> I
    C -- Direct Call --> J
    C -. HTML Pipeline .-> K[Browser Invoice<br/>with QR Image]

    D --> H
    D --> J
    E --> J
    F --> I
    G --> J
    D2 --> S
    D3 --> S
    D4 --> API
    D5 --> API

Quick Start

Install

pip install zatca-mcp              # Phase 1 (generation + validation)
pip install zatca-mcp[phase2]      # Phase 2 (signing + ZATCA API)

Use with Claude Desktop

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "zatca": {
      "command": "zatca-mcp"
    }
  }
}

Restart Claude Desktop. You can now ask Claude to generate ZATCA-compliant invoices.

Fikra CLI

export ANTHROPIC_API_KEY="sk-ant-..."
pip install zatca-mcp[phase2]
fikra                              # works from any directory

Fikra CLI

A Claude Code-style conversational agent that turns natural language into compliant invoices with professional HTML output.

Features:

  • Gradient ASCII banner with #c8e64a brand theming

  • ❯ prompt with streaming responses

  • ⏺ tool-use indicators (mirrors Claude Code UX)

  • Auto-generates HTML invoices with embedded QR code images

  • Opens invoices in your browser automatically

  • Token usage display (↳ input Β· output tokens)

  • /help /clear /quit commands

     β—‡
    β—‡β—†β—‡
     β—‡       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—
    β•± β•²      β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
   β•±   β•²     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
   ╰───╯     β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘
              β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
              β•šβ•β•     β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•

  Model: claude-sonnet-4-20250514  |  Tools: 8 ZATCA tools  |  Phase 2 βœ“  |  cwd: ~/zatca-mcp

  Tips: "I sold 10 laptops at 3000 SAR each to TechCo" to get started
        /help for commands, /quit to exit

❯ I just closed a deal with Al-Rajhi Corp for consulting β€” 10 hours at 500 SAR

  ⏺ generate_invoice

  βœ“ Invoice saved & opened in browser
  ~/zatca-mcp/examples/invoices/INV-2026-001_20260217.html

  Great news on closing the deal! I've generated a ZATCA-compliant invoice
  for Al-Rajhi Corp β€” 10 hours of consulting at 500 SAR each.

  **Invoice Summary:**
  - Subtotal: 5,000.00 SAR
  - VAT (15%): 750.00 SAR
  - **Total: 5,750.00 SAR**

  The HTML invoice with embedded QR code is open in your browser.

  ↳ 1,847 input Β· 312 output tokens

Tools API Reference

Creates a complete XML invoice following Saudi Arabia's ZATCA e-invoicing standard. Supports Standard (B2B), Simplified (B2C), Credit Note, and Debit Note types. Automatically calculates VAT, line totals, and embeds QR code data.

Parameter

Type

Required

Description

invoice_type

string

Yes

"standard", "simplified", "credit_note", or "debit_note"

invoice_number

string

Yes

Unique identifier (e.g., "INV-2024-001")

issue_date

string

Yes

YYYY-MM-DD format

seller_name

string

Yes

Seller business name

seller_vat

string

Yes

15-digit VAT number

seller_address

string

Yes

Seller street address

seller_city

string

Yes

Seller city

buyer_name

string

Yes

Buyer/customer name

items

string

Yes

JSON array: [{"name": "...", "quantity": 1, "unit_price": 100.00, "vat_rate": 0.15}]

currency

string

No

ISO currency code (default: "SAR")

buyer_vat

string

No

Required for standard (B2B) invoices

buyer_address

string

No

Buyer street address

buyer_city

string

No

Buyer city

note

string

No

Optional invoice note

billing_reference_id

string

No

Original invoice ID (required for credit/debit notes)

billing_reference_date

string

No

Original invoice date (for credit/debit notes)

instruction_note

string

No

Reason for credit/debit note

Returns: Complete UBL 2.1 XML invoice string with embedded QR code.

Creates a Base64-encoded QR code payload following ZATCA's Tag-Length-Value (TLV) format for Phase 1 and Phase 2 compliance.

Parameter

Type

Required

Description

seller_name

string

Yes

Business/taxpayer name (Arabic or English)

vat_number

string

Yes

15-digit Saudi VAT number

timestamp

string

Yes

ISO 8601 format (e.g., "2024-01-15T10:30:00Z")

total_amount

string

Yes

Invoice total including VAT (e.g., "1150.00")

vat_amount

string

Yes

Total VAT charged (e.g., "150.00")

Returns: JSON with qr_base64 and decoded_verification data.

Runs 16 business rule checks including required fields, VAT number format, mathematical accuracy of line totals and VAT calculations, credit/debit note references, and structural integrity of UBL 2.1 XML.

Parameter

Type

Required

Description

invoice_xml

string

Yes

Complete UBL 2.1 XML invoice string

Returns: JSON with is_valid (boolean), errors (list), warnings (list), and checks_run (16).

Generates an ECDSA secp256k1 key pair and a CSR with ZATCA-required subject fields. Requires cryptography (install with pip install zatca-mcp[phase2]).

Parameter

Type

Required

Description

common_name

string

Yes

Certificate CN field

organization

string

Yes

Organization name

organizational_unit

string

Yes

Organization unit

country

string

No

Country code (default: "SA")

serial_number

string

No

ZATCA device serial number

invoice_type

string

No

ZATCA invoice type code (default: "1100")

location

string

No

Business location (default: "Riyadh")

industry

string

No

Business category (default: "IT")

Returns: JSON with csr_pem, private_key_pem, warning, and next_step.

Injects an XAdES-BES digital signature into a UBL 2.1 invoice XML. Rebuilds the QR code with Phase 2 cryptographic tags (6-8). Requires cryptography.

Parameter

Type

Required

Description

invoice_xml

string

Yes

UBL 2.1 XML invoice string to sign

certificate_pem

string

Yes

PEM-encoded X.509 certificate

private_key_pem

string

Yes

PEM-encoded ECDSA private key

Returns: JSON with signed_xml, invoice_hash, qr_base64, and is_phase2_compliant.

Submits a signed invoice to the ZATCA Fatoora API for reporting (simplified) or clearance (standard). Requires httpx and pydantic.

Parameter

Type

Required

Description

signed_invoice_xml

string

Yes

Signed UBL 2.1 XML invoice

invoice_hash

string

Yes

Base64-encoded SHA-256 hash

invoice_uuid

string

Yes

Invoice UUID

certificate

string

Yes

Base64-encoded certificate

secret

string

Yes

API secret from CSID

mode

string

No

"reporting" (default) or "clearance"

environment

string

No

"sandbox" (default) or "production"

Returns: ZATCA API response with status, validationResults, warnings, and errors.

Submits an invoice to the ZATCA compliance endpoint for server-side validation. Requires httpx and pydantic.

Parameter

Type

Required

Description

signed_invoice_xml

string

Yes

Signed UBL 2.1 XML invoice

invoice_hash

string

Yes

Base64-encoded SHA-256 hash

invoice_uuid

string

Yes

Invoice UUID

certificate

string

Yes

Base64-encoded certificate

secret

string

Yes

API secret from CSID

Returns: ZATCA compliance validation results.

Extracts all encoded tag values from an existing ZATCA QR code for verification or inspection.

Parameter

Type

Required

Description

qr_base64

string

Yes

Base64-encoded TLV string from a ZATCA QR code

Returns: JSON with decoded tag names and their values.

Programmatic Usage

from zatca_mcp.utils.xml_builder import build_invoice_xml
from zatca_mcp.utils.tlv import encode_tlv
from zatca_mcp.utils.validation import validate_invoice_xml

# Generate invoice
xml = build_invoice_xml(
    invoice_type="simplified",
    invoice_number="INV-2024-001",
    issue_date="2024-01-15",
    seller_name="Fikrah Tech",
    seller_vat="300000000000003",
    seller_address="123 King Fahd Road",
    seller_city="Riyadh",
    buyer_name="Walk-in Customer",
    line_items=[
        {"name": "AI Consulting", "quantity": 10, "unit_price": 500.00},
        {"name": "Setup Fee", "quantity": 1, "unit_price": 1000.00},
    ],
)

# Validate
result = validate_invoice_xml(xml)
print(f"Valid: {result['is_valid']}")  # True
print(f"Checks: {result['checks_run']}")  # 16

# Generate QR code
qr = encode_tlv(
    seller_name="Fikrah Tech",
    vat_number="300000000000003",
    timestamp="2024-01-15T10:00:00Z",
    total_amount="6900.00",
    vat_amount="900.00",
)
print(f"QR: {qr}")

Phase 2: Digital Signing

from zatca_mcp.utils.signing import (
    generate_private_key,
    generate_csr,
    inject_signature,
    hash_invoice,
)

# Generate key pair and CSR
key = generate_private_key()
csr_pem = generate_csr(
    key,
    common_name="My Company",
    organization="My Org",
    organizational_unit="IT",
)
# Submit CSR to ZATCA to get a certificate, then sign:
# signed_xml = inject_signature(xml, cert_pem, key)
# invoice_hash = hash_invoice(xml)

ZATCA Compliance

Validation Rules (16 Business Rules)

Rule

Check

Description

BR-01

Invoice ID

cbc:ID is mandatory

BR-02

Issue Date

cbc:IssueDate mandatory, YYYY-MM-DD format

BR-03

Type Code

cbc:InvoiceTypeCode must be 388, 381, or 383

BR-04

Currency

cbc:DocumentCurrencyCode is mandatory

BR-05

Seller Name

Seller RegistrationName is mandatory

BR-06

Seller VAT

15-digit VAT number, starts/ends with 3

BR-07

Buyer Name

Buyer RegistrationName is mandatory

BR-08

Buyer VAT (B2B)

Required for standard invoice subtype 01*

BR-09

β€”

Reserved

BR-10

Line Items

At least one cac:InvoiceLine required

BR-11

Line Math

qty Γ— price = line extension amount (Β±0.01)

BR-12

Tax Total

cac:TaxTotal/cbc:TaxAmount is mandatory

BR-13

Payable Amount

cbc:PayableAmount is mandatory

BR-14

Total Cross-Check

tax-exclusive + tax = tax-inclusive (Β±0.01)

BR-15

Billing Reference

Credit/Debit notes must reference original invoice

BR-16

Instruction Note

Credit/Debit notes should include a reason

Invoice Types

Type

Code

Subtype

Use Case

Standard Tax Invoice

388

0100000

B2B transactions

Simplified Tax Invoice

388

0200000

B2C / POS transactions

Standard Credit Note

381

0100000

B2B returns/refunds

Simplified Credit Note

381

0200000

B2C returns/refunds

Standard Debit Note

383

0100000

B2B additional charges

Simplified Debit Note

383

0200000

B2C additional charges

QR Code TLV Tags

Tag

Name

Phase

1

Seller Name

1

2

VAT Registration Number

1

3

Timestamp

1

4

Invoice Total (with VAT)

1

5

VAT Amount

1

6

Invoice Hash

2

7

ECDSA Signature

2

8

ECDSA Public Key

2

Tags 6-8 are populated by the sign_invoice tool with real cryptographic data (SHA-256 hash, ECDSA signature, public key).

Engineering Quality

  • 127 tests across 7 test modules (TLV, validation, invoice, signing, credit/debit, API client, resources/prompts)

  • CI/CD β€” GitHub Actions: ruff lint + format check, mypy type checking, pytest with coverage across Python 3.10 / 3.11 / 3.12, plus a dedicated Phase 2 job

  • Decimal precision β€” all financial calculations use Decimal with ROUND_HALF_UP, never floating point

  • UBL 2.1 compliance β€” full OASIS namespace declarations (ubl, cac, cbc, ext, ds, xades)

  • Arabic/UTF-8 β€” ensure_ascii=False throughout; Arabic seller/buyer names work correctly

  • Graceful degradation β€” Phase 2 tools return helpful errors if cryptography/httpx not installed

Project Structure

zatca-mcp/
β”œβ”€β”€ src/zatca_mcp/
β”‚   β”œβ”€β”€ server.py              # MCP server β€” 9 tools, 3 resources, 3 prompts
β”‚   β”œβ”€β”€ cli.py                 # Fikra CLI β€” global `fikra` command
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ xml_builder.py     # UBL 2.1 XML invoice generator
β”‚   β”‚   β”œβ”€β”€ validation.py      # 16-rule validation engine
β”‚   β”‚   β”œβ”€β”€ tlv.py             # TLV QR encoder/decoder
β”‚   β”‚   └── signing.py         # XAdES-BES digital signing (Phase 2)
β”‚   └── api/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ client.py          # ZATCA Fatoora API client (Phase 2)
β”‚       └── models.py          # Pydantic v2 API models (Phase 2)
β”œβ”€β”€ examples/
β”‚   └── fikrah_agent.py        # Legacy entry point (redirects to fikra command)
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_invoice.py        # Invoice generation tests
β”‚   β”œβ”€β”€ test_tlv.py            # TLV encoding/decoding tests
β”‚   β”œβ”€β”€ test_validation.py     # Validation engine tests
β”‚   β”œβ”€β”€ test_resources_prompts.py # MCP resources & prompts tests
β”‚   β”œβ”€β”€ test_signing.py        # Digital signing tests (Phase 2)
β”‚   β”œβ”€β”€ test_credit_debit.py   # Credit/debit note tests (Phase 2)
β”‚   └── test_api_client.py     # API client tests (Phase 2)
β”œβ”€β”€ .github/workflows/
β”‚   └── test.yml               # CI pipeline (Phase 1 + Phase 2 jobs)
β”œβ”€β”€ pyproject.toml
└── LICENSE

Development

git clone https://github.com/DoubleH10/zatca-mcp.git
cd zatca-mcp

# Phase 1 only
pip install -e ".[dev]"

# Phase 1 + Phase 2 (signing, API)
pip install -e ".[dev,phase2]"

# Tests
pytest tests/ -v                                    # All tests
pytest tests/ -v -m "not sandbox"                   # Skip live sandbox tests

# Linting & types
ruff check src/ tests/
mypy src/zatca_mcp/ --ignore-missing-imports

# MCP Inspector (interactive testing)
mcp dev src/zatca_mcp/server.py

Roadmap

  • TLV QR code generation (Phase 1 + Phase 2 tags)

  • UBL 2.1 XML invoice generation

  • 16-rule validation engine (BR-01 through BR-16)

  • MCP server with 8 tools

  • Fikra CLI (streaming, HTML invoices, QR images)

  • CI/CD pipeline (ruff + mypy + pytest matrix + Phase 2 job)

  • XAdES-BES digital signing (ECDSA secp256k1)

  • ZATCA API integration (sandbox + production)

  • Certificate management (CSR generation)

  • Credit/debit note support (381/383)

  • PyPI package publishing

  • MCP Resources & Prompts

  • HTTP/SSE transport

  • Arabic RTL invoice template

Built with zatca-mcp

Project

Description

Fikrah

Agentic AI workforce for financial operations β€” uses this server as its ZATCA compliance backbone

Using zatca-mcp in your project? Open a PR to add it here.

Contributing

Contributions welcome! See CONTRIBUTING.md for setup instructions. Check the good first issues for a place to start.

License

Apache 2.0 β€” see LICENSE

Available Tools

9 tools
check_complianceA

Check a signed invoice against ZATCA compliance rules.

Validates the invoice with ZATCA's server-side checks before actual submission. Useful for testing compliance without affecting production records.

Args: signed_invoice_xml: Signed UBL 2.1 XML invoice string invoice_hash: Base64-encoded SHA-256 hash of the invoice invoice_uuid: Invoice UUID certificate: Base64-encoded compliance certificate secret: API secret from ZATCA environment: "sandbox" or "production"

Returns: JSON with ZATCA validation results

ParametersJSON Schema
NameRequiredDescriptionDefault
secretYes
certificateYes
environmentNosandbox
invoice_hashYes
invoice_uuidYes
signed_invoice_xmlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

No annotations provided, so the description carries full burden. It says the tool performs a server-side validation and returns JSON results, but does not disclose rate limits, failure behavior, or authentication specifics beyond parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a one-line summary, a usage sentence, and a clear Args/Returns list. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no annotations, and an output schema, the description provides parameter meanings, return type, and use case. It lacks error handling details but is sufficient for a check tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description's Args section explains all 6 parameters with brief descriptions, including the 'environment' parameter enumerating 'sandbox' or 'production', adding meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the verb 'check' and resource 'signed invoice against ZATCA compliance rules', and distinguishes from siblings like 'submit_invoice' and 'validate_invoice' by specifying it's a pre-submission compliance check.

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?

The description says 'useful for testing compliance without affecting production records', implying use before submission. It does not explicitly state when not to use or alternatives, but the context is clear.

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

decode_qrA

Decode a ZATCA TLV-encoded QR code string.

Useful for verifying or inspecting existing QR codes from ZATCA-compliant invoices. Extracts all encoded tag values.

Args: qr_base64: Base64-encoded TLV string from a ZATCA QR code

Returns: JSON with decoded tag names and their values

ParametersJSON Schema
NameRequiredDescriptionDefault
qr_base64Yes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, but description fully discloses behavior: extracts all encoded tag values and returns JSON. No side effects implied; adequate for a read-only decode operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with purpose, uses clear labeled sections for args and returns. No unnecessary words.

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?

Complete for a single-parameter decode tool with output schema; covers input format, output format, and usage context. No missing information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description fully explains the parameter: 'Base64-encoded TLV string from a ZATCA QR code', adding meaning beyond the schema's type.

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

Purpose5/5

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

Description clearly states 'Decode a ZATCA TLV-encoded QR code string' with verb and resource; distinguishes from sibling generate_qr_code by specifying decoding vs generating.

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?

Explicitly says 'useful for verifying or inspecting existing QR codes from ZATCA-compliant invoices' providing context; could be improved by explicitly contrasting with validate_invoice but overall clear.

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

generate_csrA

Generate a ZATCA-compliant Certificate Signing Request (CSR).

Creates an ECDSA key pair and CSR with ZATCA-required subject fields. The CSR is used to obtain a compliance certificate from ZATCA.

Args: common_name: Common name for the certificate (e.g., device or taxpayer name) organization: Organization name organizational_unit: Organizational unit (e.g., "Invoicing", "IT") country: Country code (default: "SA") serial_number: ZATCA device serial number invoice_type: ZATCA invoice type code (e.g., "1100") location: Business location industry: Business industry category

Returns: JSON with csr_pem, private_key_pem, and next steps

ParametersJSON Schema
NameRequiredDescriptionDefault
countryNoSA
industryNoIT
locationNoRiyadh
common_nameYes
invoice_typeNo1100
organizationYes
serial_numberNo1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8195e2f28
organizational_unitYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses that an ECDSA key pair and CSR are created and returns JSON, but fails to mention important aspects like side effects (e.g., private key handling, storage, security implications), whether the operation is safe or destructive, or any required permissions. This lack of context leaves the agent uncertain about potential impacts.

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 reasonably concise with a clear 'Args' section and a 'Returns' line. It front-loads the main purpose. However, the argument list is a bit lengthy and could be formatted as bullet points for better readability. Still, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, output schema exists), the description covers the tool's purpose and return format adequately. It mentions 'next steps' which is helpful. However, it lacks behavioral context (security, side effects) and does not explain the relationship to other tools in the ZATCA workflow. The output schema exists, so return values are partially covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain each parameter. It provides a one-line purpose for each of the 8 parameters (e.g., 'common_name: Common name for the certificate'), adding meaning beyond the schema's type/default. However, it could be more precise (e.g., expected formats for serial_number or invoice_type). Overall, it compensates well for the missing schema descriptions.

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

Purpose5/5

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

The description clearly states the tool generates a ZATCA-compliant Certificate Signing Request, specifying the verb 'generate' and the resource 'CSR'. It is well-distinguished from sibling tools like generate_qr_code or generate_invoice, which handle different functions.

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

Usage Guidelines3/5

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

The description implies usage in obtaining a compliance certificate from ZATCA, but does not explicitly state when to use this tool versus alternatives. No alternative tools are mentioned for CSR generation, and there is no guidance on prerequisites or when not to use it.

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

generate_invoiceA

Generate a ZATCA-compliant UBL 2.1 XML e-invoice.

Creates a complete XML invoice following Saudi Arabia's ZATCA e-invoicing standard. Supports Standard (B2B), Simplified (B2C), Credit Note, and Debit Note invoice types. Automatically calculates VAT, line totals, and embeds QR code data.

Args: invoice_type: "standard" (B2B), "simplified" (B2C), "credit_note", or "debit_note" invoice_number: Unique invoice identifier (e.g., "INV-2024-001") issue_date: Invoice date in YYYY-MM-DD format seller_name: Seller business name seller_vat: Seller 15-digit VAT number (e.g., "300000000000003") seller_address: Seller street address seller_city: Seller city name buyer_name: Buyer/customer name items: JSON array of line items. Each item: {"name": "Product", "quantity": 1, "unit_price": 100.00, "vat_rate": 0.15} currency: ISO currency code (default: "SAR") buyer_vat: Buyer VAT number (required for standard invoices) buyer_address: Buyer street address (optional) buyer_city: Buyer city (optional) note: Optional note to include on the invoice billing_reference_id: Original invoice ID (required for credit/debit notes) billing_reference_date: Original invoice date (for credit/debit notes) instruction_note: Reason for credit/debit note (recommended)

Returns: Complete UBL 2.1 XML invoice string

ParametersJSON Schema
NameRequiredDescriptionDefault
noteNo
itemsYes
currencyNoSAR
buyer_vatNo
buyer_cityNo
buyer_nameYes
issue_dateYes
seller_vatYes
seller_cityYes
seller_nameYes
invoice_typeYes
buyer_addressNo
invoice_numberYes
seller_addressYes
instruction_noteNo
billing_reference_idNo
billing_reference_dateNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the tool automatically calculates VAT, embeds QR code data, and returns an XML string. This provides good insight into behavior, though it omits details like error handling or performance characteristics.

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 well-structured with a summary paragraph followed by an argument list. While lengthy, it is justified by the tool's complexity (17 parameters). The main purpose is front-loaded, but some redundant phrasing ('Creates a complete XML invoice') could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity, schema, and output schema, the description covers all parameters and the return type. It does not explain potential errors or edge cases, but for an AI agent generating invoices, the instructions are sufficient. The existence of an output schema mitigates the need for detailed output description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It does so excellently by providing detailed explanations of all 17 parameters, including examples, types, and required conditions (e.g., 'buyer_vat' required for standard invoices). This adds significant meaning beyond the bare schema.

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

Purpose5/5

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

The description clearly states it 'Generate a ZATCA-compliant UBL 2.1 XML e-invoice' and lists supported invoice types (Standard, Simplified, Credit Note, Debit Note). This specific verb+resource combination distinguishes it from sibling tools like generate_qr_code, validate_invoice, etc.

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

Usage Guidelines3/5

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

The description implies it's for creating invoices but does not explicitly state when to use it versus alternatives (e.g., for signing or submitting, use other tools). No when-not or exclusion criteria are provided, leaving the agent to infer usage from context.

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

generate_qr_codeA

Generate a ZATCA-compliant TLV-encoded QR code.

Creates a Base64-encoded QR code payload following ZATCA's Tag-Length-Value (TLV) format for Phase 1 and Phase 2 compliance. The resulting string can be used to generate a scannable QR code on printed invoices.

Args: seller_name: Business/taxpayer name (Arabic or English) vat_number: 15-digit Saudi VAT registration number (starts and ends with 3) timestamp: Invoice date/time in ISO 8601 format (e.g., "2024-01-15T10:30:00Z") total_amount: Invoice total including VAT as string (e.g., "1150.00") vat_amount: Total VAT charged as string (e.g., "150.00")

Returns: JSON with qr_base64 (the encoded string) and decoded verification data

ParametersJSON Schema
NameRequiredDescriptionDefault
timestampYes
vat_amountYes
vat_numberYes
seller_nameYes
total_amountYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the output structure (JSON with qr_base64 and decoded data) but omits details on error handling, validation failures, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with a clear introductory sentence, a structured parameter list, and a summary of the return value. Every sentence adds value, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (confirmed by context signals), the description adequately covers purpose, parameters, and output. It is complete for a simple generation tool, though it could mention error scenarios or assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides detailed explanations for all 5 required parameters, including format hints (e.g., 15-digit vat_number, ISO 8601 timestamp) and examples, adding significant meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool generates a ZATCA-compliant TLV-encoded QR code. It specifies the output format (Base64), the standard (ZATCA TLV), and the use case (printed invoices), distinguishing it from siblings like decode_qr or generate_invoice.

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

Usage Guidelines3/5

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

The description implies usage for generating QR codes on invoices but does not explicitly state when to use this tool versus alternatives like decode_qr or validate_invoice. No when-not-to-use guidance is provided.

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

render_invoice_htmlA

Render a ZATCA invoice XML as a professional HTML document.

Takes a UBL 2.1 XML invoice (as generated by generate_invoice) and produces a styled HTML page with embedded QR code image, ready for viewing in a browser or printing.

Args: invoice_xml: Complete UBL 2.1 XML invoice string

Returns: Complete HTML document string with embedded styles and QR code image

ParametersJSON Schema
NameRequiredDescriptionDefault
invoice_xmlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains the output is a styled HTML document with embedded QR code, but does not explicitly confirm no side effects or state changes. For a rendering tool, this is acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (two sentences plus args/returns section), front-loaded with the main purpose, and well-structured with clear separation of input and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single parameter and the presence of an output schema, the description covers input, output, and usage context. It does not discuss error handling or limitations, but these are not critical for a simple render tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by defining invoice_xml as 'Complete UBL 2.1 XML invoice string', adding meaning beyond the type alone.

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

Purpose5/5

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

The description specifies the verb 'render' and resources 'ZATCA invoice XML' and 'professional HTML document', clearly distinguishing it from siblings like generate_invoice (which produces XML) and check_compliance (compliance check).

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?

The description mentions input context: 'as generated by generate_invoice', implying a usage workflow. However, it does not explicitly state when not to use or list alternatives for similar tasks.

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

sign_invoiceA

Digitally sign a ZATCA invoice with XAdES-BES.

Takes an unsigned invoice XML and applies a digital signature using the provided certificate and private key. Produces a signed XML with embedded XAdES-BES signature in UBLExtensions, and rebuilds the QR code with Phase 2 tags (hash, signature, public key).

Args: invoice_xml: Unsigned UBL 2.1 XML invoice string certificate_pem: PEM-encoded X.509 certificate from ZATCA private_key_pem: PEM-encoded ECDSA private key

Returns: JSON with signed_xml, invoice_hash, qr_base64, and compliance status

ParametersJSON Schema
NameRequiredDescriptionDefault
invoice_xmlYes
certificate_pemYes
private_key_pemYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description fully describes the signing process, input/output, and QR code rebuilding; lacks details on error states or prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise headline, clear description, and structured argument/return sections; no wasted words.

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?

Complex tool with output schema; description covers input, process, and output fields (signed_xml, invoice_hash, qr_base64, compliance status) adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description adds detailed explanations for all three parameters (invoice XML, certificate, private key) beyond their names.

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

Purpose5/5

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

The description clearly states the tool signs a ZATCA invoice with XAdES-BES and explains the process, distinguishing it from siblings like generate_invoice and validate_invoice.

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?

Explicitly states when to use (to sign an invoice) and the context of ZATCA invoices; while it doesn't specify when not to use, the sibling tool list provides implicit differentiation.

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

submit_invoiceA

Submit a signed invoice to ZATCA for reporting or clearance.

Sends the signed invoice to ZATCA's Fatoora API. Use "reporting" mode for simplified invoices (B2C) and "clearance" mode for standard invoices (B2B).

Args: signed_invoice_xml: Signed UBL 2.1 XML invoice string invoice_hash: Base64-encoded SHA-256 hash of the invoice invoice_uuid: Invoice UUID certificate: Base64-encoded compliance/production certificate secret: API secret from ZATCA mode: "reporting" (simplified) or "clearance" (standard) environment: "sandbox" or "production"

Returns: JSON with ZATCA's response (status, validation results)

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoreporting
secretYes
certificateYes
environmentNosandbox
invoice_hashYes
invoice_uuidYes
signed_invoice_xmlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description fully explains the action (sending to ZATCA's Fatoora API) and key behaviors like mode selection and environment. It lacks details on side effects, authentication beyond parameters, or failure handling, but for a submission tool it is sufficiently transparent.

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 well-structured with a clear purpose sentence followed by a bulleted Args list and Return statement. It is slightly verbose but every sentence adds value; could be a bit more concise without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 params, 5 required) and absence of structured output schema, the description covers all parameters, mode distinctions, environment, and return format. It provides sufficient context for an agent to invoke the tool correctly, though sibling relationships are not elaborated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides detailed explanations for all 7 parameters (e.g., signed_invoice_xml as 'Signed UBL 2.1 XML invoice string', invoice_hash as 'Base64-encoded SHA-256 hash'), compensating fully for the 0% schema coverage. Each parameter's purpose and format are clearly defined.

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

Purpose5/5

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

The description clearly states the verb 'Submit' and the resource 'signed invoice to ZATCA for reporting or clearance'. It distinguishes the tool from siblings like generate_invoice, validate_invoice, and sign_invoice by focusing on submission to ZATCA.

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?

The description explicitly specifies when to use 'reporting' mode for B2C and 'clearance' mode for B2B, providing clear context. However, it does not directly state when not to use this tool or offer alternatives among siblings, though the implied usage is clear.

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

validate_invoiceA

Validate an invoice XML against ZATCA business rules.

Runs comprehensive checks including: required fields, VAT number format, mathematical accuracy of line totals and VAT calculations, and structural integrity of the UBL 2.1 XML.

Args: invoice_xml: Complete UBL 2.1 XML invoice string to validate

Returns: JSON with is_valid (boolean), errors (list of issues), warnings (list), and checks_run (number of rules checked)

ParametersJSON Schema
NameRequiredDescriptionDefault
invoice_xmlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries full behavioral disclosure. It accurately describes the read-only nature of validation and details the return structure (is_valid, errors, warnings, checks_run). However, it does not mention synchronous/asynchronous execution or potential timeouts for large payloads, which are minor omissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a one-sentence summary followed by bullet points and fully documented arguments/returns. Every sentence adds value without redundancy.

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 simple one-parameter input and the presence of an output schema (providing full return structure), the description covers all necessary aspects: what the tool does, what it validates, and exactly what it returns. No gaps are evident.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description compensates for 0% schema coverage by fully describing the single parameter 'invoice_xml' with format (UBL 2.1 XML) and completeness expectation. This adds significant meaning beyond the schema's type-only definition.

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

Purpose5/5

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

The description clearly states the tool validates an invoice XML against ZATCA business rules, specifying the exact scope (comprehensive checks including required fields, VAT format, math accuracy, and UBL 2.1 structure). It uniquely identifies this tool among siblings, as no other sibling is dedicated to validation.

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

Usage Guidelines3/5

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

The description implies usage for post-generation/signing validation but lacks explicit guidance on when to use this tool versus alternatives (e.g., 'check_compliance') or when not to use it. No context on prerequisites or exclusions is provided.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv0.1.0
    • First observedcheck_compliance
    • First observeddecode_qr
    • First observedgenerate_csr
    • First observedgenerate_invoice
    • First observedgenerate_qr_code
    • First observedrender_invoice_html
    • First observedsign_invoice
    • First observedsubmit_invoice
    • First observedvalidate_invoice

TDQS

A4.4/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a clearly distinct purpose covering different stages of ZATCA e-invoicing: QR generation, invoice creation, validation, CSR generation, signing, submission, compliance checking, and HTML rendering. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., generate_invoice, validate_invoice, decode_qr). No mixing of conventions.

Tool Count5/5

9 tools is well-scoped for the domain of ZATCA e-invoicing, covering all necessary operations without being excessive or insufficient.

Completeness5/5

The tool set covers the full lifecycle: CSR generation, invoice creation, validation, signing, submission, compliance checking, and rendering. Missing features like invoice retrieval are not critical for this purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for electronic invoicing that enables generating, validating, and parsing Factur-X and ZUGFeRD compliant XML invoices. It supports the French 2026 B2B reform and provides integration with Chorus Pro for automated invoice submission and status tracking.
    9
    50
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for German e-invoice compliance (XRechnung 3.0 & ZUGFeRD 2.x) enabling AI agents to validate, generate, parse, and check compliance of electronic invoices per EN 16931.
    6
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for e-invoice platforms. Enables natural language querying of invoices, partners, company data, and financial reports.
    18
    8
    6
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI assistants to parse, validate, and analyze Portuguese SAF-T tax files, providing tools for querying invoices, customers, products, VAT breakdowns, and anomaly detection.
    1
    MIT