Skip to main content
Glama
cmendezs

mcp-einvoicing-de

Invoice Parse

invoice_parse

Extract structured JSON data from ZUGFeRD 2.x or XRechnung 3.x invoices by supplying raw XML, base64 XML, or base64 PDF with embedded XML.

Instructions

Extract structured data from a ZUGFeRD 2.x or XRechnung 3.x invoice.

Accepts raw XML (CII or UBL), base64-encoded XML, or base64-encoded PDF (ZUGFeRD hybrid — the XML is extracted from the PDF/A-3 attachment). Returns a structured JSON object matching the invoice data model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_base64NoBase64-encoded PDF bytes. The tool will extract the embedded XML attachment (ZUGFeRD hybrid PDF/A-3).
xml_base64NoBase64-encoded XML bytes.
xml_contentNoRaw XML string.
include_raw_xmlNoInclude the raw XML string in the response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.11.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "xml_content"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "xml_base64"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "pdf_base64"
      -    ]
      -  }
      -]
    • addedInput schema / properties / include_raw_xml / description
      Added value: +"Include the raw XML string in the response."
    • addedInput schema / properties / pdf_base64 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / pdf_base64 / default
      Added value: +null
    • changedInput schema / properties / pdf_base64 / description
      Previous value: -"Base64-encoded PDF (ZUGFeRD hybrid)."New value: +"Base64-encoded PDF bytes. The tool will extract the\nembedded XML attachment (ZUGFeRD hybrid PDF/A-3)."
    • removedInput schema / properties / pdf_base64 / type
      Removed value: -"string"
    • addedInput schema / properties / xml_base64 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / xml_base64 / default
      Added value: +null
    • changedInput schema / properties / xml_base64 / description
      Previous value: -"Base64-encoded XML."New value: +"Base64-encoded XML bytes."
    • 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
    • removedInput schema / properties / xml_content / type
      Removed value: -"string"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral transparency burden. It discloses meaningful behavior: for PDFs, the XML is extracted from the PDF/A-3 attachment, and the output matches the invoice data model. It does not mention error behavior or what happens when multiple inputs are supplied, but for a parsing operation the key behaviors are adequately surfaced.

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 three dense sentences: purpose, accepted inputs, output. Every sentence adds a distinct fact, there is no boilerplate, and the most important verb/object combination is front-loaded.

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?

The description covers accepted formats and result shape, and the output schema handles return values. The main gap is that all params are optional in the schema, yet the description implies at least one input should be provided; it never explicitly states that exactly one input source is required or what happens if multiple are passed. This is a moderate completeness issue for correct invocation.

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 meaningful description. The tool description restates the input format categories in prose but adds no semantic detail beyond the schema, so the baseline score of 3 applies.

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: 'Extract structured data from a ZUGFeRD 2.x or XRechnung 3.x invoice.' This clearly identifies the tool's parsing function and distinguishes it from siblings like invoice_validate or invoice_convert, which have different purposes.

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 context by enumerating accepted input forms (raw XML, base64 XML, base64 PDF) and the output type (structured JSON), so an agent can tell when this tool fits. However, it does not explicitly contrast with alternatives such as invoice_validate or invoice_convert, so it stops short of full routing guidance.

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