Skip to main content
Glama

ZUGFeRD & XRechnung Validator

Validate or Compute German Leitweg-ID

validate_leitweg_id
Read-onlyIdempotent

Validate a German public-sector Leitweg-ID per ISO/IEC 7064 Mod 97-10 and identify the federal or state submission portal, or compute valid 2-digit check digits from grob and optional fein segments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "validate_leitweg_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
feinNoOptional Feinadressierung (up to 30 alphanumeric characters A-Z, 0-9) used with grob to compute check digits.
grobNoGrobadressierung (2-12 digits starting with Bundesland/Bund code 01-16 or 99) to compute check digits when leitwegId is omitted.
leitwegIdNoFull Leitweg-ID to validate (e.g. "991-12345-73" or "05-123456-25").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, so the description's job is to add substance — and it does: it names the checksum standard, discloses that validation returns a portal identification, and states that compute mode yields 2-digit check digits. With no output schema, these two output claims are genuinely valuable. It still does not say what happens on an invalid ID (error vs. result field), which is the main remaining unknown.

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?

A single sentence with no filler, and the primary verb and resource are front-loaded. The embedded 'or' clause makes the two modes slightly dense to parse in one pass, but nothing is redundant.

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?

For a 3-parameter, annotation-rich tool with no output schema, the description covers both operating modes and describes what each returns (portal identification, check digits). The gaps are error/invalid-input behavior and any note on which argument wins if both are provided — neither is fatal.

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 modestly beyond by explaining the functional relationship between grob, optional fein, and the generated check digits rather than just labeling them. It does not add format or validation-rule detail (e.g. the 01-16/99 prefix rule) beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (validate / compute) and a specific resource (German public-sector Leitweg-ID), plus the algorithm used (ISO/IEC 7064 Mod 97-10) and a secondary effect (identifying the federal or state submission portal). The dual-mode structure is stated clearly. It does not explicitly distinguish itself from the sibling validate_einvoice_xml, but the target artifact is unmistakably different.

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 'or' construction plus 'from grob and optional fein segments' makes the two entry paths legible: supply leitwegId to validate, or supply grob/fein to get check digits. It does not spell out the precedence when both are supplied (the schema's 'when leitwegId is omitted' does), and it gives no exclusions or pointer to the sibling tool.

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