Skip to main content
Glama

Check Swiss QR-bill Payload

check_swiss_qr_bill
Read-onlyIdempotent

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. For a type S address in CH or LI, sps_check.postcode_locality compares postcode and town with the official directory of localities of swisstopo (©swisstopo, version date in as_of). A warning (postcode_town_mismatch, postcode_other_country, postcode_not_listed) comes back when the directory lists the postcode for other towns or in the other country, or lists neither the postcode nor the town in that postal area; never an error, and valid does not change. A postcode missing from the directory, while the town is listed there under another postcode of the same postal area (likely a post-office box postcode), comes back not_verifiable, without a warning: the absence of a warning does not mean the pair was verified. IMPORTANT: relay each finding's source string. COST: $0 per call, on every surface (free with no key on this transport: 25 units a week per source address, one per call and one per IBAN in batch_validate_iban, reset on Monday 00:00 UTC. Or an ifk_ key with no e-mail at all: POST https://api.ibanforge.com/v1/keys/generate with no body for 25 calls/month, on the REST API or on this transport, and POST /v1/keys/claim lifts that same key to 200 a month. Send the key here as Authorization: Bearer ifk_… (or X-API-Key) and each call counts against it exactly as on the REST API).

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.
amountYes
codingYes
sourceYes
qr_typeYes
trailerYes
versionYes
creditorYes
currencyYes
findingsYes
referenceYes
next_stepsYes
creditor_ibanYes
ultimate_debtorYes
alternative_schemesYes
billing_informationYes
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_messageYes
ultimate_creditor_emptyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / creditor / properties / sps_check / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "conforms": {
      -        "type": "boolean"
      -      },
      -      "findings": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "detail": {
      -              "type": "string"
      -            },
      -            "rule": {
      -              "type": "string"
      -            },
      -            "source": {
      -              "type": "string"
      -            },
      -            "verdict": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "rule",
      -            "verdict",
      -            "detail",
      -            "source"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "note": {
      -        "type": "string"
      -      },
      -      "scheme": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "scheme",
      -      "conforms",
      -      "findings",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "conforms": {
      +        "type": "boolean"
      +      },
      +      "findings": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "detail": {
      +              "type": "string"
      +            },
      +            "rule": {
      +              "type": "string"
      +            },
      +            "source": {
      +              "type": "string"
      +            },
      +            "verdict": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "rule",
      +            "verdict",
      +            "detail",
      +            "source"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "postcode_locality": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "as_of": {
      +                "description": "Version date of the directory (YYYY-MM-DD).",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "detail": {
      +                "description": "What was compared and what came out of it.",
      +                "type": "string"
      +              },
      +              "localities": {
      +                "description": "The entries the directory gives for this postcode; empty when it has none.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "canton": {
      +                      "description": "null in Liechtenstein.",
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "country": {
      +                      "description": "CH | LI",
      +                      "type": "string"
      +                    },
      +                    "municipality": {
      +                      "type": "string"
      +                    },
      +                    "name": {
      +                      "description": "The locality as the directory writes it.",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "municipality",
      +                    "canton",
      +                    "country"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "source": {
      +                "description": "The directory, its version and the credit ©swisstopo that its terms require.",
      +                "type": "string"
      +              },
      +              "status": {
      +                "description": "match | town_mismatch | other_country | postcode_not_listed | not_verifiable | directory_unavailable. not_verifiable: the postcode is not in the directory, which lists territory only, while the town is listed under other postcodes of the same postal area (a post-office box or business postcode is likely).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "status",
      +              "localities",
      +              "detail",
      +              "source",
      +              "as_of"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Swiss and Liechtenstein addresses with a postcode and a town: whether the two go together in the official directory of localities of swisstopo. Informative, beside the format verdicts: it does not change conforms or valid. The street is not checked. null for any other address."
      +      },
      +      "scheme": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "scheme",
      +      "conforms",
      +      "findings",
      +      "postcode_locality",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / ultimate_debtor / properties / sps_check / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "conforms": {
      -        "type": "boolean"
      -      },
      -      "findings": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "detail": {
      -              "type": "string"
      -            },
      -            "rule": {
      -              "type": "string"
      -            },
      -            "source": {
      -              "type": "string"
      -            },
      -            "verdict": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "rule",
      -            "verdict",
      -            "detail",
      -            "source"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "note": {
      -        "type": "string"
      -      },
      -      "scheme": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "scheme",
      -      "conforms",
      -      "findings",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "conforms": {
      +        "type": "boolean"
      +      },
      +      "findings": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "detail": {
      +              "type": "string"
      +            },
      +            "rule": {
      +              "type": "string"
      +            },
      +            "source": {
      +              "type": "string"
      +            },
      +            "verdict": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "rule",
      +            "verdict",
      +            "detail",
      +            "source"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "postcode_locality": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "as_of": {
      +                "description": "Version date of the directory (YYYY-MM-DD).",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "detail": {
      +                "description": "What was compared and what came out of it.",
      +                "type": "string"
      +              },
      +              "localities": {
      +                "description": "The entries the directory gives for this postcode; empty when it has none.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "canton": {
      +                      "description": "null in Liechtenstein.",
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "country": {
      +                      "description": "CH | LI",
      +                      "type": "string"
      +                    },
      +                    "municipality": {
      +                      "type": "string"
      +                    },
      +                    "name": {
      +                      "description": "The locality as the directory writes it.",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "municipality",
      +                    "canton",
      +                    "country"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "source": {
      +                "description": "The directory, its version and the credit ©swisstopo that its terms require.",
      +                "type": "string"
      +              },
      +              "status": {
      +                "description": "match | town_mismatch | other_country | postcode_not_listed | not_verifiable | directory_unavailable. not_verifiable: the postcode is not in the directory, which lists territory only, while the town is listed under other postcodes of the same postal area (a post-office box or business postcode is likely).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "status",
      +              "localities",
      +              "detail",
      +              "source",
      +              "as_of"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Swiss and Liechtenstein addresses with a postcode and a town: whether the two go together in the official directory of localities of swisstopo. Informative, beside the format verdicts: it does not change conforms or valid. The street is not checked. null for any other address."
      +      },
      +      "scheme": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "scheme",
      +      "conforms",
      +      "findings",
      +      "postcode_locality",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / properties / ready_for_2026_11_14 / description
      Previous value: -"valid AND every present address is structured (type S): what banks require from 14.11.2026."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."
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds substantial behavior: warnings vs errors semantics (postcode_town_mismatch and friends never flip 'valid'), the not_verifiable state and its silent failure mode, the proposed_structured fix field, source-string citation requirement, and cost/quota terms. No contradiction with the read-only annotations.

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?

Well front-loaded with USE WHEN / DO NOT USE / RETURNS / COST headers, and most content is load-bearing. But the COST block runs several sentences deep into key generation endpoints and monthly quotas that duplicate the request_api_key / poll_api_key siblings, which dilutes a tool description for a zero-argument-cost read.

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?

Despite an existing output schema, the description pre-digests the return shape (creditor_iban sub-fields, findings, next_steps) and explains the non-obvious fields (sps_check, proposed_structured, not_verifiable). Nothing an agent needs to call it correctly or interpret the result is missing.

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% and the schema's own payload description enumerates the full line layout in more detail than the prose does, so the description adds little parameter-level meaning beyond 'the text a QR-bill's code carries (starts with SPC)'. Baseline 3 applies when the schema does the heavy lifting.

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 ('Check a Swiss QR-bill payload') and immediately scopes it: the QR text beginning with SPC, checked rule by rule with SIX-cited findings. An agent can distinguish it from validate_iban, check_postal_address and validate_payment_reference without opening any 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?

Explicit USE WHEN scenario (scanned or generated QR-bill, before paying or issuing) plus an explicit DO NOT USE that names the alternative tool (validate_iban) and the question it answers instead (bank holding the account, payment-rail participation). The when/when-not pair is as clear as it gets.

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.