Skip to main content
Glama
NBrain Saudi ZATCA MCP Server

NBrain Saudi ZATCA MCP Server

decode_zatca_tlv

Decodes and validates Saudi ZATCA Phase 1 or Phase 2 Base64 TLV QR payloads, extracting tag data to verify invoice QR compliance.

Instructions

Decode and validate a Saudi ZATCA Phase 1 (Tags 1-5) or Phase 2 (Tags 1-9) Base64 TLV QR payload.

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": {
      "payload": "<payload>"
    },
    "name": "decode_zatca_tlv"
  }
}

Input Schema

NameRequiredDescriptionDefault
payloadYesBase64-encoded ZATCA TLV QR string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does add real behavioral content by disclosing that the tool both decodes and validates, and that it handles two payload phases with different tag ranges. It omits what happens on a malformed or tampered payload (error vs partial decode), whether validation verdicts are separate from decoded values, and whether any phase mismatch is detected.

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?

One sentence, front-loaded with the verb, with the disambiguating phase/tag detail placed after the core statement. No filler or redundant restatement of the tool name.

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?

With no output schema and no annotations, the description should say roughly what comes back. It never indicates whether the result is a set of tag values, a validity verdict, or both, which matters for a tool whose name promises two operations. Coverage of input scope is otherwise good.

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?

There is a single required parameter and schema description coverage is 100%, so the schema already defines payload as a Base64-encoded ZATCA TLV QR string. The description adds only the Phase 1 / Phase 2 framing, not any guidance on encoding, padding, or what constitutes a well-formed input. Baseline 3 is appropriate.

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?

States a specific verb pair (decode and validate) applied to a specific resource (Saudi ZATCA Base64 TLV QR payload), and the Phase 1 (Tags 1-5) / Phase 2 (Tags 1-9) qualifier tells an agent exactly which payload variants are covered. It is naturally distinguishable from the encode_zatca_tlv sibling by the decode/encode verb pair.

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 rather than stated: an agent can infer it should call this when holding a Base64 TLV QR string and needing its contents read or checked. There is no explicit when-not guidance, no mention of encode_zatca_tlv as the inverse operation, and no mention of validate_saudi_vat_number as the alternative for checking a VAT number rather than a QR payload.

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