Skip to main content
Glama

invowerk

Read an e-invoice into JSON

parse_invoice
Read-only

Read an existing e-invoice into JSON keyed on EN 16931 Business Terms.

The JSON is the input format of generate_invoice, so you can edit it and create the invoice again.

Input: invoice_base64 is the base64 of an XML invoice (UBL or CII) or a ZUGFeRD / Factur-X PDF, at most 4 MB decoded; or pass the file as a download link in file. A PDF may have at most 500 pages and 16 attachments.

Returns model (the invoice as JSON), detection (syntax, flavor, customization_id) and source ("xml" or "pdf-embedded"). A file that cannot be read fails with an error that starts with an error code, e.g. a PDF without embedded XML, a UBL credit note or malformed XML.

Credits: 2 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.
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. Changed6 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"
    • removedInput schema / required
      Removed value: -[
      -  "invoice_base64"
      -]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, yet the description adds the operational envelope: 4 MB decoded limit, 500 page / 16 attachment caps, supported syntaxes, the shape of the return (model, detection, source), failure modes with coded errors, and a 2-credit cost. That is well beyond what the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Front-loads the core action and output, then breaks Input / Returns / Credits into scannable units with no filler sentences. Every line carries actionable detail.

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 two-parameter read tool with a nested file object and an output schema, the description covers input sources, limits, return fields, failure behavior, and cost. Nothing an agent needs in order 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds accepted input formats (UBL, CII, ZUGFeRD/Factur-X PDF) and the size constraint that the schema does not state. It stops short of clarifying the mutual exclusivity between invoice_base64 and file.

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 and resource ('Read an existing e-invoice into JSON') plus the output convention (keyed on EN 16931 Business Terms). It also ties itself to the sibling ecosystem by naming generate_invoice as the consumer of its output, so an agent can distinguish it from convert_invoice or validate_invoice.

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?

Explains the round-trip workflow: read to JSON, edit, then re-create with generate_invoice, which tells the agent why and when to call it. It stops short of explicitly excluding the other siblings (validate_invoice, convert_invoice) or stating when not to use it.

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.