Skip to main content
Glama
beliq-mcp

beliq-mcp

Official
by beliq-eu

beliq: Parse E-Invoice

beliq_parse_einvoice
Read-onlyIdempotent

Parse an EU electronic invoice from UBL/CII XML or Factur-X/ZUGFeRD PDF into structured EN 16931 data, returning format, profile, invoice fields, totals, and warnings.

Instructions

Parse an EU electronic invoice into a structured EN 16931 invoice object. Accepts a UBL or CII XML document (inline via document, or a file via documentPath), or a Factur-X / ZUGFeRD PDF via documentPath. Returns the detected format and profile, the extracted invoice (number, dates, currency, seller, buyer, lines, totals, and more), and warnings that say what the document holds and the parsed invoice does not. Report the warnings with the invoice. Use it to read the contents of an invoice; use validate to check it against the rules.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "beliq_parse_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoSource syntax hint. 'auto' (default) detects CII vs UBL from the document.
documentNoThe invoice as XML text. Provide this OR documentPath, not both.
documentPathNoPath to an invoice file on disk: a UBL/CII XML, or a Factur-X / ZUGFeRD PDF. Provide this OR document.

Output Schema

NameRequiredDescriptionDefault
formatYes
invoiceYes
warningsYesWhat the document holds and the parsed invoice does not. Report these with the invoice: an empty list is the only case in which the invoice is all the API read.
profileUrnNo
profileDetectedNo
businessProcessIdNo
franceCtcDetectedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety, idempotency and open-world behavior, so the description's job is to add operational context—which it does by describing the return shape (detected format, profile, extracted invoice, warnings) and the meaning of warnings ('what the document holds and the parsed invoice does not'). The one gap is failure behavior: it says nothing about what happens with malformed or unsupported documents.

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 outcome, then inputs, then returns, then routing advice—a logical order with little waste. Minor slack in the vague 'and more' inside the return list and the slightly repetitive restatement of accepted input types already covered by the schema.

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 an output schema present, the description needn't enumerate return fields and mostly doesn't; parameters are fully covered by schema plus prose. Remaining shortfall is error/edge-case coverage for a parser that will inevitably encounter invalid documents.

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 coverage is 100%, so all three parameters are already documented, including the document/documentPath mutual exclusion and the 'auto' format detection. The description largely restates these facts and adds only the useful nuance that PDFs go through documentPath while XML may be inline.

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 with the exact output contract: 'Parse an EU electronic invoice into a structured EN 16931 invoice object.' It also enumerates accepted inputs (UBL, CII, Factur-X/ZUGFeRD), which distinguishes it from convert/generate/validate siblings at a glance.

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 when-to-use ('read the contents of an invoice') and names the alternative with its differing purpose ('use validate to check it against the rules'). It also implies a sequencing story: parse first, then validate.

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