Skip to main content
Glama

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. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered; the description adds genuinely useful behavior beyond that: conversion is self-validated, invalid documents are never returned, unreadable input raises an error, the 4 MB decoded limit, and a cost of 3 credits per call. It stops short of describing pagination or timing, but for a stateless converter the disclosure is strong.

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?

The first sentence front-loads purpose and the validation guarantee, then input, output and cost are separated into labeled blocks that are easy to scan. It is slightly longer than strictly necessary given the schema repeats much of the input detail, but no sentence is wasted.

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 four-parameter conversion tool with an output schema, everything an agent needs is present: both input modes, the target syntax, flavor defaulting behavior, the return fields, the validation guarantee, failure behavior and cost. Nothing material is left for the agent to guess.

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 invoice_base64, file, target_syntax and target_flavor, including the 4 MB limit and flavor fallback. The description largely restates those facts and adds no syntax examples or validation rules beyond what the schema carries, making this the baseline case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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) plus the concrete target formats UBL and CII, so the operation is unambiguous. It does not name or contrast with siblings such as parse_invoice, validate_invoice, or generate_invoice, so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the input alternatives (base64 vs. download link) and the optional target_flavor semantics, which helps an agent call it correctly. However, there is no explicit when-to-use/when-not guidance and no routing advice against the sibling tool set, leaving the choice between conversion and parsing/validation unstated.

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.