Skip to main content
Glama

Apdf — PDF Tracking & Analytics

Validate E-Invoice

validate-e-invoice
Read-only

Check a ZUGFeRD, Factur-X or XRechnung invoice, given as PDF or as bare invoice XML (CII or UBL), against PDF/A-3 (PDFs only) and the schema and business rules of EN 16931, Factur-X and XRechnung. Returns "valid", the "level", the "checks" that ran (the "pdf" and the invoice "xml", each with "rules_checked" and "rules_failed") and the "errors" and "warnings", each with its "source" (pdf, xml or file), the "rule" it breaks and a "message". Always runs asynchronously and returns a job id; poll "check-job-status" or provide "webhook_url" to receive a callback.

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": {
      "file": "<file>"
    },
    "name": "validate-e-invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPublicly reachable URL of the e-invoice: a PDF or an invoice XML.
webhook_urlNoCallback URL invoked when the async job finishes. Omit and poll "check-job-status" instead if no callback endpoint is available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous value: -"Publicly reachable URL of the e-invoice PDF."New value: +"Publicly reachable URL of the e-invoice: a PDF or an invoice XML."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries most of the burden and does so well: it discloses mandatory async execution, the job-id return, polling/callback mechanics, and the shape of results including error sources (pdf, xml, file). It could still mention limits (input size, standards coverage edge cases) but is substantially richer than the annotation set.

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-loaded with purpose, then the standards, then return shape, then async mechanics – a logical order with no filler. It is a single dense paragraph with some quoted-field enumeration that, while justified by the absence of an output schema, is heavier than ideal.

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?

No output schema exists, and the description fully compensates by naming the returned fields (valid, level, checks, rules_checked/rules_failed, errors/warnings with source, rule, message). Combined with the async job/callback explanation, an agent has everything needed to invoke and follow up correctly.

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 schema baseline is 3; the description adds meaning by clarifying that "file" may be a PDF or bare invoice XML in CII or UBL syntax, and that PDF/A-3 checking applies only to PDFs. It also frames "webhook_url" as the alternative to polling, reinforcing the schema's note.

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 ("Check") and a precise resource set (ZUGFeRD, Factur-X or XRechnung invoices supplied as PDF or CII/UBL XML) with the exact standards applied (PDF/A-3, EN 16931). This clearly separates it from siblings like create-e-invoice or read-e-invoice without needing their schemas.

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?

Gives concrete operational guidance: the call always runs asynchronously, so poll "check-job-status" or supply "webhook_url" for a callback. It does not, however, say when to prefer this over a sibling such as read-e-invoice, nor any precondition/exclusion beyond acceptable input formats.

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