Skip to main content
Glama

validate_erechnung

Read-onlyIdempotent

Validates ZUGFeRD PDF/A-3b and XRechnung XML against EN 16931, KoSIT BR-DE rules, and PDF/A compliance, returning errors and warnings to diagnose statutory violations.

Instructions

Validate a ZUGFeRD PDF/A-3b or XRechnung 3.0 XML against official EN 16931 XSD, KoSIT German Business Rules (BR-DE-*), and veraPDF ISO 19005-3. Use to check statutory compliance and diagnose rule violations; use parse_erechnung instead when you want to extract invoice fields and line items. Returns JSON with valid (boolean), profile, format, pdfaCompliant, errors[], and warnings[] (each with rule_id, field, message, and human_hint).

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_erechnung"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoOptional original filename ending in .pdf or .xml to assist content-type detection.
fileBase64NoBase64-encoded ZUGFeRD PDF/A-3b or XRechnung XML file to validate (provide either fileBase64 or xmlContent).
xmlContentNoRaw UTF-8 XRechnung or Factur-X XML string to validate (alternative to fileBase64).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.1
    • changedInput schema / properties / fileBase64 / description
      Previous value: -"Base64-encoded ZUGFeRD PDF or XRechnung XML"New value: +"Base64-encoded ZUGFeRD PDF/A-3b or XRechnung XML file to validate (provide either fileBase64 or xmlContent)."
    • changedInput schema / properties / filename / description
      Previous value: -"Filename ending in .pdf or .xml"New value: +"Optional original filename ending in .pdf or .xml to assist content-type detection."
    • changedInput schema / properties / xmlContent / description
      Previous value: -"Raw UTF-8 XRechnung / Factur-X XML string (alternative to fileBase64)"New value: +"Raw UTF-8 XRechnung or Factur-X XML string to validate (alternative to fileBase64)."
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower, yet the description still adds real context: which rule sets are evaluated and what the response contains. It does not mention performance characteristics or file-size limits, which keeps it from a 5.

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?

Three sentences, front-loaded with purpose and standards, then routing, then return shape — nothing wasted. The enumerated return fields are slightly list-heavy but justified because no output schema exists.

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?

With no output schema, the description correctly takes on the burden of describing the JSON response, including the shape of errors[] and warnings[] entries. Combined with the standards list and the sibling routing, an agent has everything needed to call and interpret it.

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%, so all three parameters (filename, fileBase64, xmlContent) are already documented, including the either/or relationship. The description adds no format, size, or encoding guidance beyond the schema, so the baseline 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?

States a specific verb (validate) and resource (eRechnung/ZUGFeRD PDF/A-3b and XRechnung 3.0 XML) plus the exact standards applied (EN 16931 XSD, KoSIT BR-DE-*, veraPDF ISO 19005-3). This is clearly distinguishable from the sibling parse_erechnung, which is named explicitly.

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

Usage Guidelines5/5

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

Explicitly states when to use it ('check statutory compliance and diagnose rule violations') and names the alternative with its selecting condition ('use parse_erechnung instead when you want to extract invoice fields and line items'). No inference is required.

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