Skip to main content
Glama

InkVoice — XRechnung & E-Invoicing

check_leitweg_id

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. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: structural validation, check-digit algorithm, return of corrected check digits, and the hyphen-placement limitation. It also explicitly states what the tool does NOT do, which is valuable for setting expectations.

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 description is thorough and well-organized, front-loading purpose and including a clear limitation note. It is somewhat long, but each sentence adds meaningful technical detail that an agent would need for correct use.

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?

The description covers what the tool validates, the algorithm used, what it returns (corrected check digits, Bundesland), and its key limitation (hyphen placement not detectable). This is fully adequate given the single-parameter schema and lack of annotations.

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 covers the single parameter with 'The Leitweg-ID to validate.' The description adds useful context about structure, length limits, and hyphen handling, but does not introduce a separate parameter-level semantic ambiguity. Since schema coverage is 100%, the extra detail slightly enriches but does not transform the parameter understanding.

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 ('checks') and identifies the exact resource (German Leitweg-ID, the routing identifier in BT-10 of an XRechnung). It clearly distinguishes this tool from the sibling tools (calculate_vat, create_invoice) by focusing on validation of a specific identifier.

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 states when to use the tool ('worth checking before building a document') and gives a when-not ('does not confirm that the ID belongs to a real authority or accepts e-invoices'). It does not explicitly name alternative tools, but the context makes the use case clear.

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