Skip to main content
Glama

validate_erechnung

Read-onlyIdempotent

Validates ZUGFeRD PDF/A-3b and XRechnung 3.0 XML against EN 16931 XSD, KoSIT BR-DE rules, and veraPDF, returning valid status plus structured rule IDs and hints.

Instructions

Validate a ZUGFeRD PDF/A-3b (Base64) or XRechnung 3.0 XML against official EN 16931 XSD, KoSIT German Business Rules (BR-DE-*), and veraPDF ISO 19005-3. Returns valid=true/false plus structured rule_id, field, 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
filenameNoFilename ending in .pdf or .xml
fileBase64NoBase64-encoded ZUGFeRD PDF or XRechnung XML
xmlContentNoRaw UTF-8 XRechnung / Factur-X XML string (alternative to fileBase64)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description adds real value by naming the validation layers and the return contract (valid=true/false with rule_id, field, human_hint), which matters because there is no output schema. It stops short of stating failure modes such as malformed Base64 or unsupported PDF variants.

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?

Two sentences, no filler: the verb and target lead, the standards follow, and the second sentence delivers the return shape. Every clause carries information an agent needs.

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 stateless read-only validator with no output schema, the description supplies the standards checked and the shape of the result, which is what an agent needs to interpret valid=false. Only minor omissions (error behaviour on bad input, whether all violations are returned or just the first) keep it from full marks.

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 coverage is 100%, so the schema already documents filename, fileBase64 and xmlContent, including that xmlContent is an alternative to fileBase64. The description repeats the Base64/XML dichotomy without adding format, size or precedence rules beyond the schema, so 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) against a precisely named resource set: ZUGFeRD PDF/A-3b Base64 or XRechnung 3.0 XML, plus the exact standards applied (EN 16931 XSD, KoSIT BR-DE-*, veraPDF ISO 19005-3). This is clearly distinct from the sibling tools generate_erechnung, parse_erechnung, embed_zugferd_pdf and magic_convert_pdf, none of which validate.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is the checking step after generation or parsing, but the description never states when to choose it over parse_erechnung or what precondition (e.g. a generated XML) must hold. No explicit alternatives or when-not conditions are given.

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