Skip to main content
Glama

InkVoice — XRechnung & E-Invoicing

Check a Leitweg-ID

check_leitweg_id
Read-only

Checks a German Leitweg-ID — the routing identifier that goes in BT-10 of an XRechnung to a public authority. An invoice to a German public body with a wrong or missing Leitweg-ID is rejected, so this is worth checking before building a document.

It verifies the structure (Grobadressierung of 2 to 12 digits, an optional Feinadressierung of up to 30 alphanumerics, then two check digits) and recomputes the ISO/IEC 7064 MOD 97-10 check digit, the same procedure an IBAN uses. When the check digits are wrong it returns the ones the address parts actually imply, so the value can be corrected rather than merely rejected. It also names the Bundesland the leading two digits point at, or Bund for the federation.

One real limit: the check digit is computed over the address parts with the hyphens removed, which is what KoSIT specifies, so it CANNOT detect a hyphen in the wrong place. '04011000-1234512345-06' and '040110001-234512345-06' both pass. That is the specification's behaviour, not a defect here.

What this does NOT do: it does not confirm that the ID belongs to a real authority or that they are reachable. It checks the number, not the recipient — there is no directory lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leitwegIdYesThe Leitweg-ID, e.g. '04011000-1234512345-06'. Surrounding whitespace is ignored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint annotation, explaining the exact verification algorithm, the ISO/IEC 7064 MOD 97-10 check-digit procedure, the hyphen-placement limitation with concrete examples, and the fact that it returns implied check digits for correction. It is exceptionally transparent about edge-case behavior.

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

Conciseness5/5

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

The description is longer than average, but every section earns its place: main purpose, verification behavior, a critical limitation with examples, and explicit non-goals. It is front-loaded with the essential purpose and remains highly readable despite the technical detail.

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?

Even without an output schema, the description states the key outputs: pass/fail on structure and check digits, the implied check digits when wrong, and the Bundesland derived from leading digits. For a single-parameter, deterministic check tool, this fully equips an agent to invoke it correctly and interpret results.

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?

The schema already describes the single parameter with an example and whitespace handling, giving a baseline of 3. The description adds genuine value by detailing the accepted structure, the check-digit computation, and the hyphen-sensitivity limitation, which helps the agent understand what values are valid and what the check actually covers.

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?

The description uses a specific verb and resource: it 'checks' a German Leitweg-ID, verifies its structure, and recomputes the check digit. It clearly distinguishes itself from broader invoice tools by stating exactly what it does not do, such as confirming the ID belongs to a real authority.

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

Usage Guidelines4/5

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

The description gives clear when-to-use context: check before building an XRechnung because a wrong or missing Leitweg-ID causes rejection. It also gives explicit when-not-to-use guidance by stating it does not validate the recipient or perform directory lookups, though it does not name a specific sibling tool as the alternative.

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