Skip to main content
Glama

invoicein

Read invoice

read_invoice
Read-onlyIdempotent

Parse any European e-invoice into canonical EN 16931 JSON and validate it against the official rule sets. Returns the detected format, the invoice as one JSON shape regardless of syntax, and a validation report whose failed rules carry plain-language fix hints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage of the fix hints and rendering labels: en, de, pl, it or fr.en
pathNoLocal file path instead of file_base64; only honoured when the server runs over stdio on the same machine.
file_base64NoThe invoice file, base64-encoded: XML (UBL, CII, XRechnung, Peppol, FatturaPA, KSeF FA(3)) or a ZUGFeRD/Factur-X hybrid PDF. Up to 25 MB decoded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNoPresent when ok is false: code, message, hint
sourceNo
invoiceNoCanonical EN 16931 JSON: document, seller, buyer, lines, tax_breakdown, totals, payment, attachments, extensions
timings_msNo
validationNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the operation read-only, idempotent, and non-destructive. The description adds valuable behavioral detail beyond the annotations: it returns the detected format, normalizes output across syntaxes, and includes fix hints with failed validation rules. This is meaningful context for an agent invoking the tool.

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?

Two sentences with no filler. The first sentence states the core purpose and validation behavior; the second expands on the return shape and report quality. All information is front-loaded and 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?

The description is complete for this tool's complexity: it covers scope, output normalization, validation, and report content. The output schema handles return-structure details, and the annotations cover safety semantics. No critical operational gap remains for an agent 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 the baseline is 3 even though the description adds no parameter-specific detail. The schema already documents lang, path, and file_base64, including allowed languages, local-path restrictions, and the 25 MB limit.

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 states a specific verb ('Parse') and resource ('any European e-invoice') and clearly defines the output: canonical EN 16931 JSON plus a validation report. This distinguishes read_invoice from its sibling validate_invoice, since it both parses and validates rather than only validating.

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

Usage Guidelines3/5

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

The description implies usage: use this tool when an invoice file needs to be parsed into canonical JSON and validated against official rule sets. However, it does not explicitly mention when to prefer validate_invoice or the conversion siblings, so the routing guidance is only implied rather than stated.

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.