Skip to main content
Glama

parse_erechnung

Read-onlyIdempotent

Parses German E-Rechnung PDFs and XML to extract embedded ZUGFeRD, Factur-X, or XRechnung data deterministically, with validated fallback extraction for flat PDFs.

Instructions

Smart Hybrid German E-Rechnung parser (Empfangspflicht): extracts embedded ZUGFeRD/Factur-X/XRechnung XML deterministically in ~20ms (source='NATIVE_XML'), or falls back to guarded extraction on flat PDFs with math_verified and iban_valid checks.

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": "parse_erechnung"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoOriginal filename ending in .pdf or .xml
fileBase64NoBase64-encoded ZUGFeRD PDF, legacy PDF, or XML
xmlContentNoRaw UTF-8 XRechnung / Factur-X XML string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/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, and the description adds real value beyond them: deterministic extraction, ~20ms latency, a source='NATIVE_XML' marker, and the math_verified/iban_valid guard checks on PDFs. It stops short of describing the actual response shape or what happens when both verification checks fail.

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 dense sentence that front-loads the core action and the two-mode split. It is efficiently packed, though the parenthetical jargon ('Empfangspflicht') and stacked qualifiers add reading cost without aiding tool selection.

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?

Annotations carry the safety profile and the cloud covers the input schema, so the description's burden is behavioral: it delivers latency, determinism, source tagging, and verification checks. Nothing critical for correct invocation is missing, making it a strong fit for a read-only parser.

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 each of filename, fileBase64, and xmlContent is already documented, making 3 the baseline. The description does not add precedence semantics for the three optional inputs (e.g., which wins if both fileBase64 and xmlContent are supplied), which is the main semantic gap the schema leaves open.

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?

States a specific verb+resource ('extracts embedded ZUGFeRD/Factur-X/XRechnung XML') and distinguishes two operating modes: deterministic native XML extraction versus guarded fallback on flat PDFs. It does not explicitly name a sibling like validate_erechnung or magic_convert_pdf, so differentiation is implied by the parse-specific scope rather than stated.

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?

The description explains the internal routing (native XML first, PDF fallback), which hints at usage but is framed as tool behavior rather than agent guidance. There is no explicit 'use this when...' condition or exclusion pointing to validate_erechnung or magic_convert_pdf, so the agent must infer when to pick this tool.

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