Skip to main content
Glama

klergrid-eu-einvoice

parse_eu_document

Parse a European e-invoice (Peppol UBL, XRechnung, ZUGFeRD/Factur-X XML or base64 PDF/A-3, Poland KSeF FA(3)) or ISO 20022 CAMT.053 bank statement into flat JSON with EN 16931 validation. Charges 1 credit.

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": {
      "content": "<content>"
    },
    "name": "parse_eu_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesRaw XML string or base64-encoded ZUGFeRD PDF/XML
encodingNoutf8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present the description carries the full burden, and it delivers two non-obvious behaviors: a fixed cost of 1 credit and that EN 16931 validation runs as part of parsing. It does not say what happens when validation fails or whether partial results are still returned, which is the main remaining gap.

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?

A single front-loaded sentence carries purpose, formats and output, followed by one short sentence on cost. Dense but every clause earns its place; the long parenthetical format list is the only mild readability cost.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description should characterize the returned JSON, but 'flat JSON' is all the agent gets — no hint about the fields emitted or how invoice vs CAMT outputs differ. For a two-mode parser with a validation step, this leaves a meaningful gap.

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 only 50% (encoding has no description), so the description must compensate, and it does for 'content' by specifying the accepted document families, including base64 PDF/A-3 which is not evident from the schema's 'Raw XML string or base64-encoded ZUGFeRD PDF/XML'. The 'encoding' parameter is left entirely to its enum and default.

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 ('Parse') plus the exact resource classes and enumerates recognized formats (Peppol UBL, XRechnung, ZUGFeRD/Factur-X, KSeF FA(3), CAMT.053) and the output shape ('flat JSON'). This clearly separates it from the sibling generators, which produce documents rather than consume them.

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 format enumeration makes the correct input context obvious and implicitly distinguishes it from generate_eu_invoice/generate_sepa_pain001. It stops short of explicit exclusions, e.g. what to do with non-European invoices or unsupported CAMT versions.

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