Skip to main content
Glama

GCC e-Invoice Preflight Oracle

Decode a ZATCA QR (TLV)

zatca_qr_decode
Read-onlyIdempotent

Decode the base64 TLV of a Saudi e-invoice QR into seller name, VAT number, timestamp, totals, hash, signature and key tags, with phase detection and format issues. Free. 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
qrYesBase64 TLV content of a ZATCA QR code.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered structurally. The description adds two genuinely new behavioral facts: the call is 'Free' and 'Documents are validated in memory and never stored or logged,' which matters for an agent handling invoice data. It stops short of rate limits or input-format failure modes.

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

Conciseness3/5

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

The purpose is front-loaded correctly in the first clause, but the second sentence is a long comma-spliced inventory of response fields (verdict, findings[], counts, ruleset version, timings, data_confidence, estimated_items[], sources[], data_version, warnings[], disclaimer) that reads far past the point of usefulness.

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?

A single-parameter read tool with full annotation coverage and an output schema is well served here; the memory-only processing guarantee is the key missing piece an agent would need and it is present. The only issue is that the lengthy field inventory is largely redundant against the existing output schema.

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?

Only one parameter, and the schema already documents it at 100% coverage ('Base64 TLV content of a ZATCA QR code'). The description restates the same thing without adding format details such as whether padding, whitespace, or raw TLV bytes are accepted, so it neither compensates nor detracts.

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 (Decode) applied to a specific resource (base64 TLV of a Saudi e-invoice QR) and enumerates the decoded fields (seller name, VAT, timestamp, totals, hash, signature). The decode/encode split from sibling zatca_qr_encode is unambiguous from the verb alone.

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 only implied through the tool name and the phrase 'with phase detection and format issues' — an agent can infer this is for inspecting a QR payload, but nothing says when to prefer this over validate_invoice or extract_summary, and there are no stated preconditions on the input string.

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