Skip to main content
Glama

Export invoice as DATEV Buchungsstapel

invoice_to_datev
Read-onlyIdempotent

Convert one received (purchase) e-invoice into a DATEV Buchungsstapel import file (EXTF format 700) for German bookkeeping in DATEV Kanzlei-Rechnungswesen or Unternehmen online. Use it only for incoming invoices booked on the German side; use invoice_to_csv for a generic table, read_invoice for the raw data, validate_invoice for rule checks (this tool does not validate). Input: XML (UBL, CII, XRechnung, Peppol BIS 3, UAE PINT AE, FatturaPA, KSeF FA(2)/FA(3)) or a ZUGFeRD/Factur-X hybrid PDF up to 25 MB; plain or scanned PDFs without embedded XML are rejected (no OCR). Returns the file content as one text string, decoded in UTF-8: the EXTF header line, the DATEV column header, then one booking row per VAT-rate group with the gross amount and S/H flag (H for credit notes), the expense account chosen by rate under the selected SKR (e.g. SKR03 3400 for 19 %, 3300 for 7 %, 3200 for 0 %, 3120 intra-EU, 3425 reverse charge), the creditor account as Gegenkonto, document and due date, invoice number in Belegfeld 1, seller name as Buchungstext and the seller VAT id on intra-EU / reverse-charge rows. Save it as UTF-8 with CRLF before importing; the account mapping is a default to confirm with the tax advisor. An unreadable file returns a tool error with the reason. Costs one invoice credit per call; without an API key the anonymous quota is 5 invoices per day per IP (a free key gives 100: https://invoicein.peculiar.systems/#get). Nothing is stored.

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_base64": "<file_base64>"
    },
    "name": "invoice_to_datev"
  }
}

Input Schema

NameRequiredDescriptionDefault
skrNoGerman standard chart of accounts that selects the expense accounts: '03' = SKR03 (default), '04' = SKR04.03
file_base64YesInvoice file content, base64-encoded (standard alphabet). Accepted content: XML in UBL 2.1, CII D16B, XRechnung, Peppol BIS Billing 3, FatturaPA 1.2 or KSeF FA(2)/FA(3) syntax, or a ZUGFeRD 1.0/2.x or Factur-X hybrid PDF (the embedded XML is used). Max 25 MB decoded. The hosted server cannot open files on your machine: read the file and send its bytes here.
creditor_accountNoCreditor account (Kreditor, written as Gegenkonto) the invoice is posted against: 4–9 digits as configured in the DATEV client, e.g. '70000' (default). Use the supplier's creditor number.70000

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / file_base64 / default
      Removed value: -""
    • changedInput schema / properties / file_base64 / description
      Previous value: -"Invoice file content, base64-encoded (standard alphabet). Accepted content: XML in UBL 2.1, CII D16B, XRechnung, Peppol BIS Billing 3, FatturaPA 1.2 or KSeF FA(2)/FA(3) syntax, or a ZUGFeRD 1.0/2.x or Factur-X hybrid PDF (the embedded XML is used). Max 25 MB decoded. Required unless `path` is given."New value: +"Invoice file content, base64-encoded (standard alphabet). Accepted content: XML in UBL 2.1, CII D16B, XRechnung, Peppol BIS Billing 3, FatturaPA 1.2 or KSeF FA(2)/FA(3) syntax, or a ZUGFeRD 1.0/2.x or Factur-X hybrid PDF (the embedded XML is used). Max 25 MB decoded. The hosted server cannot open files on your machine: read the file and send its bytes here."
    • removedInput schema / properties / path
      Removed value: -{
      -  "default": "",
      -  "description": "Absolute path of the invoice file on the machine running the server, used instead of file_base64. Only honoured over stdio (`python -m invoicein.mcp_server`); the hosted server at invoicein-api.peculiar.systems ignores it and answers with an error asking for file_base64.",
      -  "title": "Path",
      -  "type": "string"
      -}
    • addedInput schema / required
      Added value: +[
      +  "file_base64"
      +]
  2. Changed13 schema fields changed
    • changedInput schema / properties / creditor_account / description
      Previous value: -"Creditor (Gegenkonto) number to post the invoice against, e.g. 70000"New value: +"Creditor account (Kreditor, written as Gegenkonto) the invoice is posted against: 4–9 digits as configured in the DATEV client, e.g. '70000' (default). Use the supplier's creditor number."
    • addedInput schema / properties / creditor_account / pattern
      Added value: +"^[0-9]{4,9}$"
    • removedInput schema / properties / file_base64 / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / file_base64 / default
      Previous value: -nullNew value: +""
    • changedInput schema / properties / file_base64 / description
      Previous value: -"The invoice file, base64-encoded: XML (UBL, CII, XRechnung, Peppol, FatturaPA, KSeF FA(3)) or a ZUGFeRD/Factur-X hybrid PDF. Up to 25 MB decoded."New value: +"Invoice file content, base64-encoded (standard alphabet). Accepted content: XML in UBL 2.1, CII D16B, XRechnung, Peppol BIS Billing 3, FatturaPA 1.2 or KSeF FA(2)/FA(3) syntax, or a ZUGFeRD 1.0/2.x or Factur-X hybrid PDF (the embedded XML is used). Max 25 MB decoded. Required unless `path` is given."
    • addedInput schema / properties / file_base64 / type
      Added value: +"string"
    • removedInput schema / properties / path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / path / default
      Previous value: -nullNew value: +""
    • changedInput schema / properties / path / description
      Previous value: -"Local file path instead of file_base64; only honoured when the server runs over stdio on the same machine."New value: +"Absolute path of the invoice file on the machine running the server, used instead of file_base64. Only honoured over stdio (`python -m invoicein.mcp_server`); the hosted server at invoicein-api.peculiar.systems ignores it and answers with an error asking for file_base64."
    • addedInput schema / properties / path / type
      Added value: +"string"
    • changedInput schema / properties / skr / description
      Previous value: -"German chart of accounts: '03' (SKR03) or '04' (SKR04)"New value: +"German standard chart of accounts that selects the expense accounts: '03' = SKR03 (default), '04' = SKR04."
    • addedInput schema / properties / skr / enum
      Added value: +[
      +  "03",
      +  "04"
      +]
    • removedInput schema / properties / skr / pattern
      Removed value: -"^(03|04)$"
  3. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description nonetheless adds real operational context the annotations cannot: one invoice credit per call, a 5/day anonymous IP quota versus 100 with a free key, the key URL, no storage, and an error on unreadable files. The main deduction is that the long return-format enumeration duplicates what the output schema should already carry, so the behavioral value-add is partly offset by redundancy rather than missing information.

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?

Purpose and constraints are front-loaded, and every paragraph carries information. It is dense but readable; the weaknesses are the run-on output-format clause and the fact that the accepted-format list is largely repeated from the file_base64 schema description, which is wasted space.

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 one-shot converter with a validation-free contract, the description covers inputs, rejected inputs, output shape, post-processing (save as UTF-8 with CRLF), cost/quota, error behavior and the disclaimer that account mapping is a default to confirm with a tax advisor. An output schema exists, so the return-value detail is a bonus rather than a requirement.

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 baseline is 3, but the description goes beyond the schema by explaining what the SKR choice actually does (expense account per VAT rate: 3400 at 19%, 3300 at 7%, 3200 at 0%, 3120 intra-EU, 3425 reverse charge) and by framing creditor_account as the Gegenkonto. That mapping logic is not in the schema and materially helps an agent pick values.

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 (convert one received e-invoice into a DATEV Buchungsstapel EXTF 700 file) plus the exact target systems (Kanzlei-Rechnungswesen, Unternehmen online). It also names the siblings it is not (invoice_to_csv, read_invoice, validate_invoice) so the agent can distinguish it without opening schemas.

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

Usage Guidelines5/5

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

Explicitly constrains scope: only incoming/purchase invoices booked on the German side, and explicitly excludes validation ("this tool does not validate") while routing to validate_invoice, read_invoice and invoice_to_csv for those jobs. It also states acceptance boundaries (XML/hybrid PDF only; plain or scanned PDFs rejected, no OCR) and the size cap.

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.