Skip to main content
Glama

Check Swiss QR-bill Payload

check_swiss_qr_bill
Read-onlyIdempotent

Validate a Swiss QR-bill payload rule by rule, citing SIX sources, and confirm structured addresses and reference/IBAN compatibility before paying or issuing.

Instructions

Check a Swiss QR-bill payload, the text a QR-bill's code carries (starts with SPC), rule by rule, each finding citing the SIX document it comes from. USE WHEN: an agent, an ERP or an accounting tool holds a scanned or generated QR-bill and must know before paying or issuing it whether it is well-formed, whether the reference type matches the IBAN (QRR needs a QR-IBAN, IID 30000-31999), and above all whether the creditor and debtor addresses are STRUCTURED (type S) or still COMBINED (type K): type K has not been permitted since 21.11.2025, and the banks guarantee payment of a type K QR-bill only until the end of September 2026. DO NOT USE to learn which bank holds the account or its payment-rail participation: that is the paid validate_iban. RETURNS: { valid, ready_for_2026_11_14, creditor_iban { value, valid, country, qr_iban, iid }, creditor { present, address, structured, sps_check, proposed_structured }, ultimate_debtor, amount, currency, reference { type, value, valid, note }, findings [{ code, severity, field, detail, source }], next_steps, source }. A combined address comes back with proposed_structured, the S-type fields derived from the combined lines, to relay as a fix. IMPORTANT: relay each finding's source string. COST: free (routed to POST /v1/ch/qr-bill/check).

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": "check_swiss_qr_bill"
  }
}

Input Schema

NameRequiredDescriptionDefault
payloadYesThe Swiss QR Code text with real line breaks: SPC, 0200, 1, IBAN, creditor (7 lines), ultimate creditor (7 empty lines), amount, currency, ultimate debtor (7 lines), reference type, reference, message, EPD, optional billing information and alternative schemes.

Output Schema

NameRequiredDescriptionDefault
validYesTrue when no finding has severity error.
amountNo
codingNo
sourceYes
qr_typeNo
trailerNo
versionNo
creditorNo
currencyNo
findingsYes
referenceNo
next_stepsYes
creditor_ibanNo
ultimate_debtorNo
alternative_schemesNo
billing_informationNo
ready_for_2026_11_14Yesvalid AND every present address is structured (type S). The name is kept for compatibility and is not a deadline: type K has not been permitted since 21.11.2025, and the banks guarantee payment of a type K QR-bill only until the end of September 2026.
unstructured_messageNo
ultimate_creditor_emptyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.10.0
    • changedOutput schema / properties / ready_for_2026_11_14 / description
      Previous value: -"valid AND every present address is structured (type S)."New value: +"valid AND every present address is structured (type S). The name is kept for compatibility and is not a deadline: type K has not been permitted since 21.11.2025, and the banks guarantee payment of a type K QR-bill only until the end of September 2026."
  2. Addedv1.5.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the safety profile is covered structurally. The description still adds real context: the QRR/QR-IBAN IID 30000-31999 rule, the 21.11.2025 type K prohibition with the end-of-September-2026 bank guarantee, the meaning of proposed_structured as a fix to relay, and the free cost/endpoint. It does not restate annotation semantics, and it does not contradict them.

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 verb and resource, then clearly partitioned by capitalized USE WHEN / DO NOT USE / RETURNS / COST headers that make it skimmable. It is dense and somewhat over-stuffed — the enumerated RETURNS fields duplicate an output schema that already exists — but nearly every sentence carries usable information.

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?

Covers purpose, prerequisites for interpretation (reference type vs IBAN, address type S vs K), the fix path via proposed_structured, and the relay-the-source instruction. An output schema exists, so the long RETURNS enumeration is surplus rather than necessary, keeping this short of a 5.

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 parameter with 100% schema description coverage; the schema already spells out the full line layout (SPC, 0200, IBAN, creditor lines, reference type, EPD, etc.). The description adds only the parenthetical 'starts with SPC' and generic framing, so baseline 3 for high coverage is correct.

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 and resource — checking a Swiss QR-bill payload, defined as the text starting with SPC — and explicitly distinguishes itself from validate_iban. An agent can identify the tool's scope without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Provides an explicit USE WHEN block (scanned or generated QR-bill held by an agent/ERP/accounting tool, prior to paying or issuing) and a DO NOT USE clause naming the alternative (paid validate_iban) for bank/payment-rail questions. The selection criteria between the two tools are unambiguous.

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