Skip to main content
Glama

finisma – ZUGFeRD e-invoices

Rechnungsdaten aus PDF auslesen

extract_invoice

Extrahiert EN-16931-Rechnungsdaten aus einer hochgeladenen PDF (Formularfelder) plus Validierungs-Issues, als Korrekturschritt vor create_zugferd: Felder und Issues dem Nutzer zeigen, korrigieren lassen, danach create_zugferd mit dem korrigierten invoice und derselben upload_id aufrufen. Unsichere Felder stehen als Platzhalter 'KORRIGIEREN' (Text) bzw. '1900-01-01' (Datum) drin und werden als Issue mit Code EXTRACTION_UNCERTAIN gemeldet — diese Felder müssen vor create_zugferd korrigiert werden. Enthält die PDF bereits eine eingebettete E-Rechnung (ZUGFeRD/Factur-X), kommen die Felder deterministisch aus der XML (source='xml') statt aus einer Sprachmodell-Lesung des Druckbilds. Erfordert ein Konto mit aktivem Abo oder Guthaben.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
upload_idNoReferenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben. Wird im Ergebnis erneut zurückgegeben und kann anschließend bei create_zugferd als 'upload_id' verwendet werden, damit dieselbe Quell-PDF eingebettet wird.
pdf_base64NoDie zu extrahierende PDF-Rechnung, Base64-kodiert (max. 25 MB). Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesHerkunft der Felder: 'xml' = deterministisch aus der in der PDF eingebetteten E-Rechnung übernommen, 'llm' = per Sprachmodell aus dem Druckbild extrahiert.
invoiceYesExtrahierte EN-16931-Rechnungsdaten (Formularfelder). Vor create_zugferd prüfen und korrigieren, insbesondere Felder mit dem Wert 'KORRIGIEREN' bzw. '1900-01-01'.
upload_idYesBei create_zugferd als 'upload_id' übergeben, damit dieselbe Quell-PDF eingebettet wird.
expires_atYesISO-8601-Zeitpunkt, ab dem upload_id verfällt. Danach erneut request_upload_link und extract_invoice aufrufen.
validation_issuesYesOffene Probleme der extrahierten Daten. severity='error' blockiert create_zugferd (dort wird dieselbe Prüfung erneut ausgeführt), 'warning' nicht.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / invoice / properties / delivery / properties / gln
      Added value: +{
      +  "maxLength": 20,
      +  "type": "string"
      +}
    • addedOutput schema / properties / invoice / properties / seller / properties / customerAssignedId
      Added value: +{
      +  "maxLength": 100,
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds genuinely useful behavior: uncertain fields appear as 'KORRIGIEREN' / '1900-01-01' placeholders flagged with code EXTRACTION_UNCERTAIN and must be fixed before create_zugferd, source='xml' vs. model reading of the rendered page, and the subscription/credit requirement. It does not mention rate limits or result payload size, but the disclosure is well beyond the annotations.

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?

Purpose and pipeline role are front-loaded in the first sentence, and the remaining sentences each carry distinct constraints (placeholders, XML branch, account requirement). It is dense and somewhat run-on as a single block, but nothing is redundant padding.

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 an output schema present, return values need no explanation, and the description still covers what an agent needs: prerequisites (upload_id or pdf_base64), the correction workflow, sentinel values to fix, the deterministic XML path, and the billing prerequisite. Nothing material is missing.

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 the schema already documents both upload_id and pdf_base64, including the mutual-exclusivity rule and base64 size limit. The description reiterates the upload_id reuse for embedding the same source PDF in create_zugferd, which is workflow context rather than new parameter semantics. Baseline 3 is appropriate.

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 and resource — extracting EN-16931 invoice data (fields plus validation issues) from an uploaded PDF — and names its role in the pipeline relative to create_zugferd. An agent can distinguish it from verify_zugferd, parse_bank_statement, and other siblings without opening any schema.

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?

Gives explicit ordering: run as a correction step before create_zugferd, show fields/issues to the user, correct them, then call create_zugferd with the corrected invoice and the same upload_id. It also covers the branch where the PDF already contains an embedded E-Rechnung, so the agent knows the XML path applies. No inference required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources