Skip to main content
Glama
jakobautomation

agentsvc-mcp

invoice_extract

Extract invoice data from PDFs, photos, or XRechnung/ZUGFeRD XML into structured JSON with line items, VAT IDs, totals, and IBAN, validated against EU VIES.

Instructions

Invoice Data Extraction (EU e-invoice) — Invoice data extraction for accounting agents: PDF, photo or XRechnung / ZUGFeRD / Factur-X XML to JSON (number, dates, seller and buyer with VAT ID, line items, tax per rate, totals, IBAN, payment terms). E-invoices are read exactly from the embedded XML, without AI; plain PDFs and photos by Claude Haiku 5.5. Every result is checked: totals add up, seller VAT ID in EU VIES, IBAN and BIC. Says whether the file is a real EN 16931 e-invoice. Up to 15 MB. Cost: $0.02 USDC per call. Latency p99: 8000ms.

Input Schema

NameRequiredDescriptionDefault
xmlNoXRechnung/ZUGFeRD XML text
pdf_urlNoPDF URL; or send one of the other inputs
xml_urlNoXML URL
validateNoCheck VAT ID and IBAN
image_urlNoPhoto or scan URL
pdf_base64NoPDF as base64
image_base64NoPhoto as base64

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the two processing paths (deterministic XML parsing vs. Claude Haiku for PDFs/photos), the validation performed (totals, EU VIES VAT ID, IBAN/BIC), the EN 16931 authenticity check, the 15 MB size limit, the $0.02 USDC per-call cost, and p99 latency of 8000ms. This is unusually rich behavioral context.

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 supported formats are front-loaded, followed by method, validation, limits, and cost — a logical order. It is dense and slightly run-on with em-dash chains, but nearly every clause (output fields, processing method, cost, latency) earns its place.

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?

No output schema exists, so the description must describe returns — and it does, enumerating number, dates, seller/buyer with VAT ID, line items, tax per rate, totals, IBAN, and payment terms. Combined with size, cost, latency, and validation disclosures, an agent has everything needed to call it correctly.

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 every parameter is already documented in the schema, establishing the baseline of 3. The description corroborates the input formats and the validate behavior but adds no syntax, precedence, or mutual-exclusion detail beyond what the schema provides.

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 — 'Invoice data extraction' — plus the exact input formats (PDF, photo, XRechnung/ZUGFeRD/Factur-X XML) and the JSON fields returned. It is clearly distinguishable from generic siblings like pdf_extract, ocr, and doc_parse because it is scoped to structured invoice data with accounting-specific output.

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?

Gives clear context for when it applies: EU e-invoices, PDFs, and photos are all supported, and it explains that e-invoices are parsed deterministically while plain PDFs/photos go through a model. However, it never names an alternative sibling (e.g. ocr or pdf_extract) or states when NOT to use it, so routing is left partly to inference.

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

Deploy Server

Other Tools