Skip to main content
Glama
cmendezs

mcp-einvoicing-de

Invoice Validate

invoice_validate

Validates ZUGFeRD 2.x or XRechnung 3.x invoice XML against EN 16931 and German KoSIT rules, returning errors and warnings. Auto-detects profile and syntax for structured compliance reports.

Instructions

Validate a ZUGFeRD 2.x or XRechnung 3.x invoice XML.

Checks against EN 16931 rules and German KoSIT Schematron rules (BR-DE-* business rules). Returns a structured validation report with errors and warnings. Supports all ZUGFeRD profiles (MINIMUM through EXTENDED) and XRechnung (CII and UBL syntax). Profile and syntax are auto-detected if not specified. By default this validator runs entirely locally (Schematron only). Set cloud_validate=True (or EINVOICING_DE_KOSIT_ENABLE=1) to opt in to sending the invoice XML to a remote KoSIT endpoint. Doing so egresses the full invoice payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strictNoIf True, warnings are also reported. If False, only errors are returned.
syntaxNoOverride syntax detection. One of: CII, UBL. If omitted, auto-detected from the XML root element namespace.
profileNoOverride profile detection. One of: MINIMUM, BASIC_WL, BASIC, EN_16931, EXTENDED, XRECHNUNG. If omitted, auto-detected from the XML GuidelineID.
xml_base64NoBase64-encoded XML bytes of the invoice.
xml_contentNoRaw XML string of the invoice to validate. Provide either xml_content or xml_base64, not both.
kosit_strictNoIf True, fail hard when the KoSIT cloud validator is unreachable instead of falling back to local Schematron.
cloud_validateNoOpt in to sending the invoice XML to a remote KoSIT endpoint (egresses the full invoice payload). Local Schematron only by default.
use_local_onlyNo[Deprecated] Use cloud_validate instead. use_local_only=True is equivalent to cloud_validate=False, which is now the default; this alias is retained for one release and will be removed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed27 schema fields changedv0.11.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "xml_content"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "xml_base64"
      -    ]
      -  }
      -]
    • addedInput schema / properties / cloud_validate
      Added value: +{
      +  "default": false,
      +  "description": "Opt in to sending the invoice XML to a remote\nKoSIT endpoint (egresses the full invoice payload). Local\nSchematron only by default.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / kosit_strict / description
      Previous value: -"Fail hard when KoSIT is unreachable (no fallback)."New value: +"If True, fail hard when the KoSIT cloud validator is\nunreachable instead of falling back to local Schematron."
    • addedInput schema / properties / profile / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / profile / default
      Added value: +null
    • changedInput schema / properties / profile / description
      Previous value: -"Override profile detection."New value: +"Override profile detection. One of: MINIMUM, BASIC_WL,\nBASIC, EN_16931, EXTENDED, XRECHNUNG. If omitted, auto-detected\nfrom the XML GuidelineID."
    • removedInput schema / properties / profile / enum
      Removed value: -[
      -  "MINIMUM",
      -  "BASIC_WL",
      -  "BASIC",
      -  "EN_16931",
      -  "EXTENDED",
      -  "XRECHNUNG"
      -]
    • removedInput schema / properties / profile / type
      Removed value: -"string"
    • changedInput schema / properties / strict / description
      Previous value: -"Include warnings in output."New value: +"If True, warnings are also reported. If False, only\nerrors are returned."
    • addedInput schema / properties / syntax / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / syntax / default
      Added value: +null
    • changedInput schema / properties / syntax / description
      Previous value: -"Override syntax detection."New value: +"Override syntax detection. One of: CII, UBL. If omitted,\nauto-detected from the XML root element namespace."
    • removedInput schema / properties / syntax / enum
      Removed value: -[
      -  "CII",
      -  "UBL"
      -]
    • removedInput schema / properties / syntax / type
      Removed value: -"string"
    • addedInput schema / properties / use_local_only / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / use_local_only / default
      Previous value: -falseNew value: +null
    • changedInput schema / properties / use_local_only / description
      Previous value: -"Skip KoSIT cloud; use only local Schematron."New value: +"[Deprecated] Use cloud_validate instead.\nuse_local_only=True is equivalent to cloud_validate=False,\nwhich is now the default; this alias is retained for one\nrelease and will be removed."
    • removedInput schema / properties / use_local_only / type
      Removed value: -"boolean"
    • addedInput schema / properties / xml_base64 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / xml_base64 / default
      Added value: +null
    • removedInput schema / properties / xml_base64 / type
      Removed value: -"string"
    • addedInput schema / properties / xml_content / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / xml_content / default
      Added value: +null
    • changedInput schema / properties / xml_content / description
      Previous value: -"Raw XML string of the invoice to validate."New value: +"Raw XML string of the invoice to validate. Provide\neither xml_content or xml_base64, not both."
    • removedInput schema / properties / xml_content / type
      Removed value: -"string"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. Changed3 schema fields changedv0.6.0
    • addedInput schema / properties / kosit_strict
      Added value: +{
      +  "default": false,
      +  "description": "Fail hard when KoSIT is unreachable (no fallback).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / use_local_only
      Added value: +{
      +  "default": false,
      +  "description": "Skip KoSIT cloud; use only local Schematron.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / use_remote_kosit
      Removed value: -{
      -  "default": false,
      -  "description": "Submit to KoSIT remote validator.",
      -  "type": "boolean"
      -}
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden and does it well by warning that cloud_validate=True 'egresses the full invoice payload' and noting the default is local-only. It also discloses the structured report output. It does not mention fallback or error behavior, but those are covered in the schema descriptions.

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 well-structured and front-loaded: core action first, then rules, return value, supported formats, and operational behavior. Every sentence adds necessary information without fluff, making it easy to scan and 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 supported standards, validation rules, profile/syntax auto-detection, local/cloud behavior, and the data-egress caveat. Combined with a fully self-describing schema and an output schema, an agent has everything needed to call the tool correctly.

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 description coverage is 100%, and each parameter already has a detailed explanation, so the baseline is 3. The main description adds one extra piece of information not in the schema (the EINVOICING_DE_KOSIT_ENABLE=1 environment variable) but otherwise does not materially extend parameter semantics.

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 opens with a specific verb and resource: 'Validate a ZUGFeRD 2.x or XRechnung 3.x invoice XML.' It further specifies the validation rules, supported profiles, and return type, making it clearly distinct from sibling tools like invoice_parse, invoice_create, or validate_eusr_report.

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 clearly identifies the intended input (invoice XML) and scope (ZUGFeRD/XRechnung, EN 16931, KoSIT rules), and explains auto-detection and default local execution. It does not explicitly name sibling validation tools as alternatives, but the strong 'invoice XML' framing plus sibling names provide enough context for an agent to choose correctly.

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