Skip to main content
Glama

Extract e-invoice data

extract_invoice
Read-onlyIdempotent

Read an e-invoice and return its business data as JSON: number, dates, seller, buyer, totals, VAT breakdown, lines.

Use to get the content of a received invoice (Factur-X PDF, CII or UBL XML) for bookkeeping, matching
or summaries. Does not judge compliance: call validate_invoice for that. Read-only, nothing stored.
Returns {profile, fields{...}} and, with include_xml, the XML text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlNoCII or UBL XML as plain text; alternative to document_base64, give exactly one
include_xmlNoAlso return the raw XML text (large); default false returns only the parsed fields
document_base64NoFactur-X PDF (the embedded XML is read) or a CII/UBL XML file, base64 encoded

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / document_base64 / description
      Previous value: -"Factur-X PDF or XML file, base64 encoded"New value: +"Factur-X PDF (the embedded XML is read) or a CII/UBL XML file, base64 encoded"
    • changedInput schema / properties / include_xml / description
      Previous value: -"Include the raw XML in the result"New value: +"Also return the raw XML text (large); default false returns only the parsed fields"
    • changedInput schema / properties / xml / description
      Previous value: -"CII or UBL XML as text (alternative to document_base64)"New value: +"CII or UBL XML as plain text; alternative to document_base64, give exactly one"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description adds useful behavioral context: 'Read-only, nothing stored' and the caveat that compliance is not evaluated. It also clarifies output shape and the optional include_xml effect. No contradiction with annotations, though much of the safety profile is already carried by 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.

Conciseness5/5

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

Three tight sentences with no filler; the purpose and returned data are front-loaded, followed by usage guidance and the key caveat. Every sentence 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?

For a read-only extraction tool with a rich output schema and full parameter descriptions, the description covers formats, use cases, exclusion of compliance checking, storage behavior, and the include_xml option. Nothing an agent needs to invoke it correctly 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 all three parameters including the alternative-to relationship and the default of include_xml. The description reinforces accepted formats (Factur-X PDF, CII or UBL XML) and include_xml behavior but adds no meaning beyond what the schema already 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?

The description uses a specific verb ('Read') and resource ('e-invoice'), and enumerates the returned business data (number, dates, seller, buyer, totals, VAT breakdown, lines). It also distinguishes itself from validate_invoice by explicitly stating it does not judge compliance, so an agent can tell it apart from siblings.

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?

It states when to use it ('get the content of a received invoice... for bookkeeping, matching or summaries') and points to the alternative for compliance ('Does not judge compliance: call validate_invoice for that'). This gives clear selection guidance against sibling tools.

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