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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply the generic profile (readOnlyHint=false, idempotentHint=false, openWorldHint=true, destructiveHint=false), while the description adds real operational context: uncertain fields are emitted as 'KORRIGIEREN'/'1900-01-01' placeholders flagged with issue code EXTRACTION_UNCERTAIN, the XML path sets source='xml', and the call requires an active subscription or credit. That is meaningful disclosure beyond the structured fields, and it does not contradict 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?

Front-loads the action and the correction workflow, and nearly every clause carries new information (placeholders, issue code, XML fallback, billing requirement). It is a dense multi-clause construction rather than a tight set of sentences, which costs a point but not readability of the core intent.

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?

An output schema exists, so return values need no prose, and the description still covers the workflow, the sentinel-value/error semantics, the source-of-truth branch, and the account prerequisite. For a two-parameter extraction tool with annotations and an output schema, nothing an agent needs 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 upload_id vs pdf_base64, the base64/25 MB constraint, and the mutual exclusivity are already fully documented in the schema. The description reinforces the upload_id reuse across create_zugferd but adds little syntax or format meaning beyond it, so the baseline 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?

States a precise verb and resource: extraction of EN-16931 invoice data plus validation issues from an uploaded PDF. It also distinguishes itself from sibling create_zugferd by positioning itself as the correction step that precedes it, so an agent can place it in the pipeline without opening another 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 an explicit ordered workflow: extract, show fields and issues to the user, let them correct, then call create_zugferd with the corrected invoice and the same upload_id. It also defines a condition branch (embedded ZUGFeRD/Factur-X XML vs. LLM reading of the print image), leaving little to inference.

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