Skip to main content
Glama

Portuguese ATCUD Invoice QR Reader API

atcud_qr_reader
Read-onlyIdempotent

Decode and validate Portuguese fiscal invoice QR codes (ATCUD format) from raw QR strings, PDF invoices, or images into structured JSON with seller/buyer NIFs, ATCUD code, document type, issue date, VAT bases, and gross totals. Deterministic offline decoding, zero AI, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/call via x402 at https://radarbg.com/x402/atcud-qr-reader.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qrText": "A:509876544*B:501234560*C:PT*D:FT*E:N*F:20260415*G:FT 2026/42*H:CSDF7T5H-42*I1:PT*I7:1000.00*I8:230.00*N:230.00*O:1230.00*Q:Ab12*R:1234"
    },
    "name": "atcud_qr_reader"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum QR codes decoded from a multi-page PDF (1-200).
qrTextNoRaw Portuguese fiscal QR payload string (A:...*B:...*H:...). Provide qrText or fileBase64.
fileNameNoOptional original filename.
fileBase64NoBase64-encoded PDF or image (PNG/JPEG) containing a Portuguese invoice QR code (max 15 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and open-world traits, yet the description adds substantive context beyond them: deterministic offline decoding, no AI involvement, no data retention, and concrete quota/auth mechanics including a per-IP daily cap and two payment paths. It does not describe what happens on a malformed or non-ATCUD payload, which is the main remaining behavioral gap.

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 first sentence front-loads the capability and output shape efficiently, and the operational second sentence is dense but justified given it carries quota, auth and payment information. The pricing URLs and sales-style framing make it slightly heavier than needed for agent selection.

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?

With no output schema, the description correctly enumerates the returned fields (NIFs, ATCUD, document type, date, VAT bases, gross totals), and it covers auth, cost and retention. Missing is any note on failure behavior for invalid or non-Portuguese codes, which matters for a decoder handling arbitrary base64 uploads.

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 coverage is 100%, so the baseline applies: the description's contribution is mainly mapping 'raw QR strings, PDF invoices, or images' onto the qrText/fileBase64 alternatives, which the schema already states. It adds nothing about the per-page `limit` cap or filename usage beyond what the schema documents.

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') with a precisely delimited resource ('Portuguese fiscal invoice QR codes (ATCUD format)') and enumerates the accepted input forms (raw QR strings, PDFs, images) plus the returned fields. That scope cleanly separates it from generic siblings like qr_code_reader and from other country-specific readers such as verifactu_qr_reader.

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 by the domain restriction to Portuguese ATCUD invoices; there is no explicit statement of when to prefer this over qr_code_reader, swiss_qr_bill_reader, or verifactu_qr_reader. The description instead spends its guidance budget on access/pricing mechanics (free 5 calls/day, API key, x402), which is useful but not selection guidance.

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