Skip to main content
Glama

Swiss QR-Bill API - QR-Rechnung PDF with IBAN, QR reference and address checks

swiss_qr_bill
Read-onlyIdempotent

Make a Swiss QR-bill (QR-Rechnung, SIX Swiss Payment Code SPC 0200, structured addresses as required since November 2025) as a print-ready PDF: receipt and payment part with the 46 mm Swiss QR code and Swiss cross, on A4 or as the 210 x 105 mm part alone, in German, French, Italian or English. Checked before the bill is drawn: CH / LI IBAN (mod-97), QR-IBAN with its 27-digit QR reference (mod-10 recursive), RF creditor reference (ISO 11649) with a normal IBAN, CHF or EUR, amount, address lengths, country code and character set. Returns the PDF (base64) and the validated payload line by line. Deterministic, 0 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/swiss-qr-bill.

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": {
      "iban": "CH4431999123000889012",
      "amount": 1949.75,
      "message": "Invoice 2026-001",
      "currency": "CHF",
      "language": "en",
      "reference": "210000000003139471430009017",
      "debtorCity": "Rorschach",
      "debtorName": "Pia-Maria Rutschmann-Schnyder",
      "creditorCity": "Biel",
      "creditorName": "Robert Schneider AG",
      "debtorStreet": "Grosse Marktgasse",
      "debtorCountry": "CH",
      "debtorHouseNo": "28",
      "creditorStreet": "Rue du Lac",
      "creditorCountry": "CH",
      "creditorHouseNo": "1268",
      "debtorPostalCode": "9400",
      "creditorPostalCode": "2501"
    },
    "name": "swiss_qr_bill"
  }
}

Input Schema

NameRequiredDescriptionDefault
ibanYesIBAN or QR-IBAN of the creditor (CH or LI, 21 characters); spaces are fine
qrPngNoAlso return the Swiss QR code alone as PNG (base64) for your own invoice layout
amountNoAmount, 0.01 to 999999999.99. Leave it out for a bill where the payer writes the amount
layoutNoa4 = A4 page with the payment part at the bottom, slip = the 210 x 105 mm payment part with receipt alonea4
messageNoAdditional information for the payer, up to 140 characters (for example the invoice number)
currencyNoCurrency of the billCHF
languageNoLanguage of the headings on the billen
referenceNoQR reference (27 digits, needed with a QR-IBAN) or RF creditor reference (ISO 11649, only with a normal IBAN). Leave it out for a bill without a reference
debtorCityNoDebtor: town, up to 35 characters
debtorNameNoDebtor (optional, leave all debtor fields out for an empty box): name, up to 70 characters
creditorCityYesCreditor: town, up to 35 characters
creditorNameYesCreditor: name of the account holder, up to 70 characters
debtorStreetNoDebtor: street, up to 70 characters
debtorCountryNoDebtor: 2-letter country code; default is the creditor's country
debtorHouseNoNoDebtor: building number, up to 16 characters
creditorStreetNoCreditor: street, up to 70 characters; a house number at the end is split off when creditorHouseNo is empty
creditorCountryNoCreditor: 2-letter country code; default is the country of the IBAN
creditorHouseNoNoCreditor: building number, up to 16 characters (optional)
debtorPostalCodeNoDebtor: postal code, up to 16 characters
creditorPostalCodeYesCreditor: postal code, up to 16 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: validation happens before drawing (IBAN mod-97, QR-IBAN with mod-10 recursive reference, ISO 11649 RF reference, currency, amount, address lengths, character set), output is deterministic with '0 AI' and 'nothing stored', and the return is the PDF plus a line-by-line payload echo. It also discloses operational constraints the annotations cannot express: a free tier of 5 calls/day per IP, paid access via X-API-Key, or per-call x402 pricing. The readOnly/idempotent annotations are consistent with a PDF-generation call.

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?

Front-loaded with the deliverable, then validation rules, then return shape, then commercial terms — a sensible order. The two long sentences are dense but nearly every clause carries information; the pricing URLs and rate-limit detail are slightly heavier than an invocation decision needs, but they are legitimately useful.

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?

For a 20-parameter, no-output-schema tool, the description covers what is produced (base64 PDF, optional PNG, validated payload), what is checked, and what it costs. An agent has enough to decide whether to call it and to predict the result without additional documentation.

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 100%, so the baseline is 3. The description goes further by stating cross-parameter rules the schema only partly encodes: the QR-IBAN requires a 27-digit QR reference while an RF creditor reference requires a normal IBAN, and the slip layout yields the payment part alone. It also gives the 46 mm QR code dimension and the supported language set, which help an agent choose values.

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 concrete verb and artifact: 'Make a Swiss QR-bill ... as a print-ready PDF', including both output variants (receipt + payment part, or the 210 x 105 mm slip). This clearly separates it from sibling tools like qr_code_generator (a code only) and iban_validator (validation only), since the description names the full bill, its QR code, and the pre-render checks.

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?

Scope is well implied: produce a Swiss QR-bill PDF with built-in validation, in one of four languages, on A4 or as a slip. However, there is no explicit when-to-use versus when-not guidance and no named alternative, despite obvious neighbours such as iban_validator for validation-only needs or qr_code_generator for a bare QR code. The agent must infer the boundaries from the described scope.

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