Skip to main content
Glama

Apdf — PDF Tracking & Analytics

Create E-Invoice

create-e-invoice

Turn a PDF invoice into a ZUGFeRD / Factur-X e-invoice (PDF/A-3 with the invoice XML embedded), from the "invoice" data or a ready "xml". Line amounts, VAT breakdown and totals are calculated. The result is validated, and an invoice that breaks a rule of its level fails with every violation. 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": "create-e-invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlNoA ready Cross Industry Invoice XML (ZUGFeRD, Factur-X or XRechnung) to embed instead of "invoice". Its level is read from the XML.
fileYesPublicly reachable URL of the PDF invoice, the readable copy of the e-invoice.
levelNoProfile of the e-invoice, "EN 16931" by default. Not used with "xml".
invoiceNoThe invoice data the XML is built from. Required unless "xml" is given.
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. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare destructiveHint=false, so the description carries most of the burden and does so well: it discloses that line amounts, VAT breakdown and totals are computed, that validation failures return every violation, and that execution is always asynchronous with a job id. It omits operational details such as the PDF needing to be publicly reachable (only in the schema) and any limits on the job result lifetime, which keeps it from a 5.

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?

Four dense sentences, front-loaded with the transformation and its result quality before async mechanics. Nothing is redundant, though the sentences are long and could be split for faster scanning.

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 deeply nested invoice-construction tool with no output schema, the description covers the essential unknowns: computation, validation failure mode, and asynchronous return contract. The remaining gap is how the produced PDF/A-3 is subsequently retrieved, which the description leaves to the sibling tools.

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 description coverage is 100%, so the baseline is 3. The description still adds value by framing the "invoice" and "xml" parameters as mutually exclusive alternatives, noting that level is derived from the XML rather than supplied, and explaining the poll-vs-webhook tradeoff for "webhook_url" — relationships the flat schema does not make explicit.

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 description names a specific verb and output artifact: turn a PDF invoice into a ZUGFeRD / Factur-X e-invoice (PDF/A-3 with embedded XML), and states both input routes ("invoice" data or ready "xml"). That is enough to distinguish it from read-e-invoice and validate-e-invoice siblings without opening any schema.

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 tells the agent which input path to take (structured "invoice" data vs a ready "xml" whose level is read from the file), and routes asynchronous consumption to polling "check-job-status" or supplying "webhook_url". What it does not do is explicitly say when to prefer validate-e-invoice or where the finished artifact is retrieved, so it stops short of full when/when-not coverage.

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