Skip to main content
Glama
NBrain Saudi ZATCA MCP Server

NBrain Saudi ZATCA MCP Server

encode_zatca_tlv

Encodes Saudi ZATCA Phase 1 invoice fields into a compliant UTF-8 Base64 TLV QR string for QR codes. Accepts seller name, VAT number, timestamp, total with VAT, and VAT amount.

Instructions

Encode Saudi ZATCA Phase 1 invoice fields into a compliant UTF-8 Base64 TLV QR string.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "seller_name": "<seller_name>",
      "vat_number": "<vat_number>",
      "timestamp": "<timestamp>",
      "total_with_vat": "<total_with_vat>",
      "vat_amount": "<vat_amount>"
    },
    "name": "encode_zatca_tlv"
  }
}

Input Schema

NameRequiredDescriptionDefault
timestampYesISO-8601 timestamp (e.g. 2026-12-05T19:30:00Z)
vat_amountYesVAT amount (2 decimals)
vat_numberYes15-digit Saudi VAT number (3XXXXXXXXXXXXX3)
seller_nameYesSeller name (Arabic or English UTF-8)
total_with_vatYesInvoice total including VAT (2 decimals)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the output encoding chain (UTF-8 → Base64 → TLV), which matters because there is no output schema. It does not state whether inputs are validated (e.g. VAT-number checksum), what happens with malformed fields, whether tag order is fixed, or that the operation is a pure, side-effect-free transformation.

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?

A single front-loaded sentence with no filler; the operation, domain, and output format appear in one pass with nothing redundant.

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

Completeness3/5

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

For a deterministic 5-parameter encoder with no annotations and no output schema, the description covers the essentials of what goes in and what comes out. It stops short of the details an agent would want: input validation behavior, error modes, and confirmation that the TLV tag order is handled internally rather than by the caller.

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%, with every field already documenting its format (ISO-8601, 15-digit VAT pattern, 2-decimal amounts), so the schema does the heavy lifting. The description adds no mapping of parameters to TLV tags or ordering, which is the one piece of semantics the schema cannot express.

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?

States a specific verb ('Encode') and resource ('Saudi ZATCA Phase 1 invoice fields') and names the output artifact ('compliant UTF-8 Base64 TLV QR string'), so the operation is unmistakable. It does not explicitly distinguish itself from the sibling decode_zatca_tlv, leaving that 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 Guidelines3/5

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

Usage is implied by the 'Phase 1 invoice' framing, which signals a QR-generation context, but there is no explicit when-to-use/when-not statement and no routing to alternatives such as decode_zatca_tlv or validate_saudi_vat_number. The agent must infer that this is the generation counterpart to decoding.

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