Skip to main content
Glama

invowerk

Convert an e-invoice between UBL and CII

convert_invoice
Read-only

Convert an e-invoice to UBL or CII. The result is checked before it is returned.

Input: invoice_base64 is the base64 of an XML invoice or a ZUGFeRD / Factur-X PDF, at most 4 MB decoded; or pass the file as a download link in file. target_syntax is "ubl" or "cii". target_flavor is optional, "en16931" or "xrechnung"; without it the flavor of the source is kept.

Returns xml, syntax, flavor and self_validation (valid, finding_count). invowerk checks the converted XML before answering and never returns an invalid document. Input that cannot be read or converted fails with an error message.

Credits: 3 per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `invoice_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
target_flavorNoOptional: "en16931" or "xrechnung". Without it the flavor of the source is kept.
target_syntaxYesSyntax to convert to: "ubl" or "cii".
invoice_base64NoThe invoice file, base64-encoded. At most 4 MB decoded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / file
      Added value: +{
      +  "default": null,
      +  "description": "The file as a download link, instead of `invoice_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.",
      +  "properties": {
      +    "download_url": {
      +      "description": "A public https URL of the file.",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "description": "An identifier for the file. ChatGPT sets it; other clients may pass any label, such as the file name.",
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / invoice_base64 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / invoice_base64 / default
      Added value: +null
    • addedInput schema / properties / invoice_base64 / description
      Added value: +"The invoice file, base64-encoded. At most 4 MB decoded."
    • removedInput schema / properties / invoice_base64 / type
      Removed value: -"string"
    • addedInput schema / properties / target_flavor / description
      Added value: +"Optional: \"en16931\" or \"xrechnung\". Without it the flavor of the source is kept."
    • addedInput schema / properties / target_syntax / description
      Added value: +"Syntax to convert to: \"ubl\" or \"cii\"."
    • changedInput schema / required
      Previous value: -[
      -  "invoice_base64",
      -  "target_syntax"
      -]New value: +[
      +  "target_syntax"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description layers on non-obvious behavior: a pre-return validation pass, a guarantee that invalid documents are never returned, the 4 MB decoded size limit, error behavior on unreadable input, and the 3-credit cost. This is exactly the operational 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line purpose, then cleanly segmented into Input, Returns and Credits blocks with no wasted clauses. It is longer than strictly necessary given a full schema and output schema exist, which keeps it off a 5.

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 conversion tool with a nested-file parameter and an output schema, the description covers inputs, target selection, validation guarantee, failure mode and cost. Nothing an agent needs to invoke 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 description coverage is 100%, so the schema already documents every parameter including the 4 MB limit, the flavor default and the file-vs-base64 distinction. The description largely restates that content rather than adding syntax or format detail beyond it, so the baseline 3 applies.

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 (Convert) and resource (e-invoice) with both source and target formats named (UBL/CII, ZUGFeRD/Factur-X). An agent can distinguish it from parse_invoice, validate_invoice and render_invoice 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?

Gives clear context on the two mutually exclusive input paths (base64 field vs file download link) and the flavor default, which is real operational guidance. It never names a sibling or an explicit when-not-to-use condition, so it stops short of a 5.

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.