Skip to main content
Glama
beliq-mcp

beliq-mcp

Official
by beliq-eu

beliq: Validate E-Invoice

beliq_validate_einvoice
Read-onlyIdempotent

Validate EU electronic invoices from XML or Factur-X/ZUGFeRD PDFs; return validity, detected format/profile, check depth, ruleset versions, and detailed errors/warnings with rule IDs.

Instructions

Validate an EU electronic invoice and report the verdict together with how deep the check went. Accepts an invoice XML document (inline via document, or a file via documentPath), or a Factur-X / ZUGFeRD PDF via documentPath. For a PDF the verdict is about the embedded XML: the PDF itself is not checked, and pdfInput says which embedded file was read. Returns valid, the detected format and profile, the check depth in verificationBadgeLabel, the ruleset versions the check ran, and every error and warning with its rule id, severity, location, and message. valid means the document passed the rule packs and schemas beliq runs for its format, in the versions the result names. It does not mean every recipient, validation tool or tax authority accepts it. Report the check depth beside the verdict, in the words of verificationBadgeLabel. When that field is absent, say the check depth was not stated and name none. When the result carries franceCtcBlockingRuleIds, lead with them: the API reports those French CTC rule ids as ending a transmission through a French platform, also where valid is true. beliq validates the 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

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_validate_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoSource syntax hint. 'auto' (default) detects the format from the document.
documentNoThe invoice as XML text. Provide this OR documentPath, not both.
franceCtcNoAlso apply the French CTC rules (BR-FR-CTC) during validation.
documentPathNoPath to an invoice file on disk: an XML document, or a PDF carrying embedded XML (Factur-X / ZUGFeRD). Provide this OR document.

Output Schema

NameRequiredDescriptionDefault
validYesWhether the document passed the rule packs and schemas beliq runs for its format, in the versions this result names. Not a statement that every recipient or tax authority accepts it.
errorsYes
formatYes
sha256No
livemodeYesFalse for a blq_test_ sandbox key, true for any other key.
pdfInputNoPresent when the document was a PDF: which embedded file the verdict is about. containerChecked is always false, because the PDF itself is not checked.
verifiedNoFalse only when no ruleset ran (generate with verify: false). Then valid says nothing about the document.
warningsYes
errorCountYes
ciusVersionNo
warningCountYes
peppolVersionNo
rulesetSha256No
driftCheckedAtNo
facturxProfileNo
facturxVersionNo
rulesetChannelNo
profileDetectedNo
rulesetFellBackNo
franceCtcAppliedNo
franceCtcVersionNo
rulesetArtifactsNo
rulesetSunsetsOnNo
verificationTierNo
schematronVersionNo
verificationBadgeNoId of the check depth. Compare this, not the label.
rulesetSupersededOnNo
romaniaRoCiusVersionNo
polandKsefFa3XsdBundleNo
sloveniaEslogXsdBundleNo
spainFacturaeXsdBundleNo
verificationBadgeLabelNoThe check depth as English display text. Print it as it is. Absent when the API states no depth for this verdict: then say the check depth was not stated, and name none.
italyFatturapaXsdBundleNo
franceCtcBlockingRuleIdsNoFrench CTC rule ids the API reports as ending a transmission through a French platform. Present also where valid is true, and never empty: when present, lead with it.
franceExtendedCtcAppliedNo
netherlandsNlciusVersionNo
italySdiMessaggiXsdBundleNo
italySdiMessaggiXsdVersionNo
polandKsefFa3RuntimeVersionNo
sloveniaEslogRuntimeVersionNo
spainFacturaeRuntimeVersionNo
italyFatturapaRuntimeVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed40 schema fields changedv0.5.1
    • changedInput schema / properties / documentPath / description
      Previous value: -"Path to an invoice file on disk: a UBL/CII XML, or a PDF carrying embedded XML (Factur-X / ZUGFeRD). Provide this OR document."New value: +"Path to an invoice file on disk: an XML document, or a PDF carrying embedded XML (Factur-X / ZUGFeRD). Provide this OR document."
    • changedInput schema / properties / format / description
      Previous value: -"Source syntax hint. 'auto' (default) detects CII vs UBL from the document."New value: +"Source syntax hint. 'auto' (default) detects the format from the document."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "auto",
      -  "cii",
      -  "ubl"
      -]New value: +[
      +  "auto",
      +  "cii",
      +  "ubl",
      +  "fatturapa",
      +  "facturae",
      +  "eslog",
      +  "poland_ksef_fa3"
      +]
    • changedInput schema / properties / franceCtc / description
      Previous value: -"Apply the French CTC (Factur-X / Chorus Pro) rule overlay during validation."New value: +"Also apply the French CTC rules (BR-FR-CTC) during validation."
    • addedOutput schema / properties / ciusVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / driftCheckedAt
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / facturxProfile
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / facturxVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / franceCtcApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / franceCtcBlockingRuleIds
      Added value: +{
      +  "description": "French CTC rule ids the API reports as ending a transmission through a French platform. Present also where valid is true, and never empty: when present, lead with it.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / franceCtcVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / franceExtendedCtcApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / italyFatturapaRuntimeVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / italyFatturapaXsdBundle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / italySdiMessaggiXsdBundle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / italySdiMessaggiXsdVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / livemode
      Added value: +{
      +  "description": "False for a blq_test_ sandbox key, true for any other key.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / netherlandsNlciusVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / pdfInput
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present when the document was a PDF: which embedded file the verdict is about. containerChecked is always false, because the PDF itself is not checked.",
      +  "properties": {
      +    "attachmentCandidates": {
      +      "type": "number"
      +    },
      +    "attachmentFoundBy": {
      +      "type": "string"
      +    },
      +    "attachmentName": {
      +      "type": "string"
      +    },
      +    "containerChecked": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "containerChecked",
      +    "attachmentFoundBy",
      +    "attachmentCandidates"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / peppolVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / polandKsefFa3RuntimeVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / polandKsefFa3XsdBundle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / romaniaRoCiusVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / rulesetArtifacts
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "fileSha256": {
      +        "type": "string"
      +      },
      +      "key": {
      +        "type": "string"
      +      },
      +      "version": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "key",
      +      "version",
      +      "fileSha256"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / rulesetChannel
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / rulesetFellBack
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / rulesetSha256
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / rulesetSunsetsOn
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / rulesetSupersededOn
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sha256
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sloveniaEslogRuntimeVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / sloveniaEslogXsdBundle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / spainFacturaeRuntimeVersion
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / spainFacturaeXsdBundle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / valid / description
      Added value: +"Whether the document passed the rule packs and schemas beliq runs for its format, in the versions this result names. Not a statement that every recipient or tax authority accepts it."
    • addedOutput schema / properties / verificationBadge
      Added value: +{
      +  "description": "Id of the check depth. Compare this, not the label.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / verificationBadgeLabel
      Added value: +{
      +  "description": "The check depth as English display text. Print it as it is. Absent when the API states no depth for this verdict: then say the check depth was not stated, and name none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / verificationTier
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / verified
      Added value: +{
      +  "description": "False only when no ruleset ran (generate with verify: false). Then valid says nothing about the document.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "valid",
      -  "format",
      -  "errorCount",
      -  "warningCount",
      -  "errors",
      -  "warnings"
      -]New value: +[
      +  "valid",
      +  "format",
      +  "errors",
      +  "warnings",
      +  "livemode",
      +  "errorCount",
      +  "warningCount"
      +]
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial non-obvious behavior: for PDFs only the embedded XML is checked and pdfInput names which file was read; 'valid' is scoped to beliq's rule packs and schemas and explicitly not to recipient or authority acceptance; franceCtcBlockingRuleIds should be led with because they can end a transmission even when valid is true. That is exactly the kind of context annotations cannot express.

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 verdict semantics are front-loaded well, but the description is long and partially prescriptive about how to phrase results ('Report the check depth beside the verdict, in the words of verificationBadgeLabel…'), which duplicates output-schema territory. The transmission/archiving paragraph is useful but reads as a second, loosely joined topic.

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?

For a tool spanning seven syntaxes plus embedded-XML PDFs, the description covers input modes, verdict scope, PDF caveats, and the French CTC blocking case. Since an output schema exists, the lengthy explanation of returned fields is arguably redundant, but nothing an agent needs 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter is already documented, and the description largely restates the document/documentPath duality rather than extending it. The one piece of added meaning is that documentPath may point at a PDF whose embedded XML is what gets validated. The franceCtc boolean is never mentioned in the description, so it adds only marginal value over the schema.

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 gives a specific verb and resource ('Validate an EU electronic invoice') and adds the distinctive output angle ('report the verdict together with how deep the check went'). That separates it cleanly from the sibling tools, which parse, convert, generate, or check accounts rather than judging conformance.

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?

It states the accepted input modes (inline document, documentPath, Factur-X/ZUGFeRD PDF) and, more usefully, what the tool is not for: 'beliq validates the document and does not send it,' with transmission, tax-authority reporting, and archiving explicitly assigned elsewhere. It does not name any sibling tool as an alternative, so it stops short of full routing guidance.

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