Skip to main content
Glama

ZUGFeRD-Bereit

Extract invoice draft from PDF, image, or XML

extract_invoice_draft

Single Orders are for businesses only (§ 14 BGB), no sale to consumers (§ 13 BGB). Consumers use a user account. Uploads an invoice file (PDF, XML, JPEG/PNG scan, CSV/XLSX) to create or update a job and extract structured EN 16931 invoice fields plus preflight field_issues (free preview). Without an API key, the first call of a new job MUST set buyer_is_business: true and accept_avv: "1.3" after your user confirmed acting as a business and accepted the AVV. Anonymous jobs default to allow_ai: false (deterministic local parsing only); set allow_ai: true only after your user explicitly consented to sending file content to Microsoft Azure OpenAI (EU).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filename": "<filename>",
      "content_base64": "<content_base64>"
    },
    "name": "extract_invoice_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
allow_aiNoAnonymous jobs only: set true ONLY after explicit user consent to Azure OpenAI (EU) extraction; false withdraws consent.
filenameYesFile name with extension (.pdf, .xml, .jpg, .png, .csv, .xlsx).
job_tokenNoOptional existing job_token to re-extract or update consent on the same job.
accept_avvNoRequired ("1.3") on the first anonymous Single Order upload confirming acceptance of the AVV.
content_base64YesBase64-encoded file bytes (max 10 MiB decoded).
buyer_is_businessNoRequired (true) on the first anonymous Single Order upload confirming the user acts as a business (§ 14 BGB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses the privacy-relevant behavior that matters most here: anonymous jobs default to allow_ai:false with deterministic local parsing only, and allow_ai:true sends file content to Microsoft Azure OpenAI (EU) and requires explicit user consent. It also flags the free-preview nature of the extraction and the consent obligations, none of which is derivable from the schema or annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense and useful, but the opening sentence on § 14/§ 13 BGB is legal framing rather than tool purpose, so the actual capability is not front-loaded. Sentences are long and compound, and some consent material is restated between description and schema descriptions.

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?

With no output schema, the description does its job by naming the returned artifacts (EN 16931 fields plus field_issues preflight, free preview) and by covering consent and privacy constraints for a 6-parameter tool. Still absent is what happens on failure (unsupported format, oversized file, missing consent) and how job_token reuse behaves.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds conditional semantics the schema does not: buyer_is_business and accept_avv are mandatory only on the first call of a new anonymous job, and allow_ai governs whether content leaves the local parser. The remaining gap is the job_token re-extraction/consent-update path, which only the schema mentions.

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?

"Uploads an invoice file (PDF, XML, JPEG/PNG scan, CSV/XLSX) to create or update a job and extract structured EN 16931 invoice fields plus preflight field_issues" gives a specific verb, accepted input formats, and the exact output artifact, which clearly separates it from validate_invoice_json or inspect_e_invoice. It stops short of naming a sibling or stating the handoff conditions, so it is strong but not fully distinguishing.

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

Usage Guidelines4/5

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

The gating conditions for the two call modes are spelled out: without an API key the first call of a new job must send buyer_is_business:true and accept_avv:"1.3", and "Consumers use a user account" excludes consumer use. What is missing is any guidance on when to re-call with job_token versus starting a new job, or when to prefer inspect_e_invoice/validate_invoice_json after extraction.

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