Skip to main content
Glama
beliq-mcp

beliq-mcp

Official
by beliq-eu

beliq: Convert E-Invoice

beliq_convert_einvoice

Convert EU electronic invoices between EN 16931 formats by providing a source document or path and a target format; XML sources return XML, while hybrid PDF targets need an output path.

Instructions

Convert an EU electronic invoice from one EN 16931 format to another. Pass the source document (inline via document, or a file via documentPath) and set targetFormat. An XML source comes back as XML inline for every target, facturx and zugferd included: XML is not wrapped into a hybrid PDF. A hybrid PDF source sent to facturx or zugferd comes back as a PDF, written to the outputPath you give: the PDF as sent, with only its annotation flags normalised for PDF/A and its container not checked, when its embedded XML already is the target; otherwise that PDF re-wrapped around the converted XML, returned only after veraPDF passed it against PDF/A-3b. With a test key the PDF is watermarked after any veraPDF check, so do not say veraPDF checked the file returned. A successful result means the API validated the invoice XML before returning it. For a facturx or zugferd target at profile en16931 that validation is the one for plain EN 16931 CII: no Factur-X profile schema is checked. It carries no verdict and no check depth; a converted document that fails comes back as an error that lists the failed rules. lostElementsCount is how many source elements the engine recorded as having no target equivalent. A loss the engine does not detect is not counted, so 0 does not say that every field of the source arrived. lostElements lists those losses, each with its path, value, reason, severity and acceptableLoss. When the list would pass the API's 6 KB header cap, it holds one { truncated: true } entry instead of the losses, and lostElementsCount stays the exact count. beliq produces the converted document and does not send it: delivery through beliq is in development. Until it is available, transmission (Peppol, plateforme agréée, SDI) and tax-authority reporting stay with your access point; archiving stays with you, and beliq does not operate KSeF submission.

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": {
      "targetFormat": "<targetFormat>"
    },
    "name": "beliq_convert_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentNoThe source invoice as XML text. Provide this OR documentPath, not both.
outputPathNoWhere to write the converted document on disk. Required when a PDF source goes to a facturx or zugferd target, optional otherwise. The call fails if a file already exists at the path.
documentPathNoPath to the source invoice on disk: a UBL/CII XML, or a Factur-X / ZUGFeRD PDF. Provide this OR document.
sourceFormatNoSource format hint. 'auto' (default) detects it from the document.
targetFormatYesFormat to convert to. An XML source comes back as XML inline for every target, facturx and zugferd included. A hybrid PDF source sent to facturx or zugferd comes back as a PDF and needs outputPath.
targetProfileNoProfile for a facturx or zugferd target; ignored for the XML targets.
dropFranceCtcOverlayNoDrop the French CTC overlay from the converted document.

Output Schema

NameRequiredDescriptionDefault
xmlNo
outputYesWhat came back, read from the response: xml, or pdf for a returned hybrid PDF.
livemodeNo
outputPathNo
contentTypeYes
bytesWrittenNo
lostElementsNoThe losses counted in lostElementsCount, each as https://docs.beliq.eu/api-reference/convert/#lostelement-schema describes, or the one truncation entry the tool description names.
sourceFormatNo
targetFormatNo
conversionToolsNo
profileDetectedNo
lostElementsCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare that this is not read-only, is open-world and non-idempotent; the description adds substantial context beyond that: validation happens before return, no Factur-X profile schema is checked at profile en16931, a test key watermarks the PDF after veraPDF, existing files at outputPath cause failure. It also discloses a real limitation — beliq does not deliver or archive the document, transmission and KSeF submission remain with the caller.

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 purpose is front-loaded and the content is substantive, but the body is a dense run-on cluster of clauses; sentences such as the one about a PDF source being 're-wrapped around the converted XML, returned only after veraPDF passed it' are hard to parse on first read. Dense reference material like lostElements truncation at the 6 KB header cap could have been tightened or separated.

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 seven-parameter conversion tool with an output schema, this covers everything an agent needs: input modes, required output path conditions, format-dependent return shapes, validation semantics, and loss reporting including the { truncated: true } sentinel. Little an agent would need in order to call it correctly is missing.

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 still adds meaning: it explains why outputPath is conditionally required and that an XML source returns XML inline for every target including facturx and zugferd, which the one-line schema description does not spell out. It does not add detail on sourceFormat auto-detection or targetProfile beyond what the schema already says.

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 first sentence names a specific verb (convert) and resource (EU electronic invoice) bounded to EN 16931 formats, which cleanly separates it from siblings like beliq_parse_einvoice and beliq_validate_einvoice. The following sentences add output-shape specifics (XML stays XML, hybrid PDF stays PDF), so an agent knows exactly what operation this performs.

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 description gives clear operational context: pass document OR documentPath, set targetFormat, and supply outputPath when a PDF source goes to facturx or zugferd. It does not name alternative sibling tools or state when-not to use this one (e.g., when to validate or parse instead), so it stops short of explicit routing guidance.

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