Skip to main content
Glama

firma.de Rechner für Gründer

firma.de E-Rechnungs-API

e_rechnung
Read-onlyIdempotent

Erstellt aus einem Rechnungsentwurf im JSON-Format eine E-Rechnung nach EN 16931 in der Syntax UN/CEFACT CII: als XRechnung 3.0 (für Behörden, mit Leitweg-ID) oder als ZUGFeRD 2.5.2 im Profil EN 16931 (für Unternehmen, als PDF/A-3 mit eingebettetem XML). Dieselbe Rechen- und XML-Logik wie der E-Rechnungs-Generator von firma.de: Positionsbeträge, Umsatzsteuer je Steuersatz, Summen und die Pflichtfelder von XRechnung. Die Antwort enthält die Hinweise des Generators, die Summen und das XML; mit ?format=xml kommt nur das XML, mit ?format=pdf die PDF-Datei. Die Beispiele des Generators sind mit dem KoSIT-Validator und mit Mustang (inklusive veraPDF) getestet. Kostenlos, ohne Schlüssel.

POST mit JSON in der Form des Entwurfs (wie draft in der Antwort): seller, buyer, lines (höchstens 50), number, issueDate, service, payment, taxCase, format, note, cashAccounting. Fehlende Felder und null lassen den Standard stehen, "" leert ein Feld. Ungültige Werte und unbekannte Felder geben 400 mit problems je Feld.

Antwortet auf Deutsch, als Text oder JSON. Der Rechner für Menschen: https://www.firma.de/e-rechnung/

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "buyer": {
        "city": "Berlin",
        "name": "Beispiel Handels GmbH",
        "email": "eingangsrechnungen@beispiel-handel.example",
        "street": "Beispielweg 22",
        "country": "DE",
        "postcode": "10115",
        "reference": "Bestellung 4711"
      },
      "lines": [
        {
          "unit": "HUR",
          "price": 120,
          "vatRate": 19,
          "quantity": 4,
          "description": "Beratung Buchhaltungssoftware"
        },
        {
          "unit": "H87",
          "price": 24.3,
          "vatRate": 7,
          "quantity": 1,
          "description": "Fachbuch"
        }
      ],
      "number": "RE-2026-001",
      "seller": {
        "city": "München",
        "iban": "DE89 3704 0044 0532 0130 00",
        "name": "Muster Software GmbH",
        "vatId": "DE123456789",
        "street": "Musterstraße 1",
        "contact": {
          "name": "Erika Musterfrau",
          "email": "rechnung@muster-software.example",
          "phone": "+49 89 1234567"
        },
        "postcode": "80331"
      },
      "payment": {
        "terms": "days",
        "dueDays": 14
      },
      "service": {
        "date": "2026-11-02",
        "mode": "date"
      },
      "taxCase": "standard",
      "issueDate": "2026-11-04"
    },
    "name": "e_rechnung"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoFreier Hinweis auf der Rechnung (BT-22).
buyerNo
linesNoPositionen, höchstens 50.
formatNomd (Standard): die Antwort als lesbarer Text mit Link in den Rechner, kurz genug für den Chat. json: alle Werte als JSON. xml: nur die E-Rechnung als XML.md
numberNoRechnungsnummer (BT-1).
sellerNo
paymentNo
serviceNo
taxCaseNotaxCase: standard (19 %, 7 % oder 0 % je Position), smallBusiness (Kleinunternehmer nach § 19 UStG, ohne Umsatzsteuer), reverseCharge (Steuerschuldnerschaft des Leistungsempfängers, § 13b UStG oder Leistungen an Unternehmen im EU-Ausland, nicht außerhalb der EU und nicht an Privatkunden; USt-IdNr. des Kunden nötig, bei Kunden im EU-Ausland auch deine), intraEu (innergemeinschaftliche Lieferung an ein Unternehmen, beide USt-IdNrn. nötig). Eine Rechnung, ein Steuerfall. Bis 250 € brutto braucht es meist keine E-Rechnung (Kleinbetragsrechnung), die API erzeugt sie trotzdem.
issueDateNoRechnungsdatum (BT-2); Standard heute.
cashAccountingNoIst-Versteuerung: druckt „Versteuerung nach vereinnahmten Entgelten“ (ab 2028 Pflicht).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already say read-only, non-destructive, idempotent; the description adds real value beyond that: no auth/key needed, output tested against KoSIT validator and Mustang/veraPDF, error behavior (400 with per-field problems), and default/null/empty-string handling. The only blemish is that the documented ?format=pdf alternative is not reflected in the actual schema enum.

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-loads the purpose and output formats, then moves to request shape, error behavior, and response language in short paragraphs. Dense but every paragraph carries weight; the sentence about identical calculation logic to the firma.de generator is slightly promotional but still informative.

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?

With no output schema, the description covers what comes back (generator hints, totals, XML; XML-only or PDF variants) and the error contract, which is enough for a document-generation tool. It stops short of saying explicitly how the XRechnung vs. ZUGFeRD choice is triggered, and the pdf format discrepancy leaves a small ambiguity.

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 64%, so extra meaning helps. The description enumerates the top-level draft fields, caps lines at 50, and explains that missing/null leaves defaults while "" clears a field, plus the 400 response shape — none of which the schema states. However, it advertises ?format=pdf although the schema enum is only md/json/xml, which is a misleading parameter claim.

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 artifact: builds an EN 16931 e-invoice in UN/CEFACT CII syntax, either XRechnung 3.0 (with Leitweg-ID) or ZUGFeRD 2.5.2 PDF/A-3. This is far more specific than the title and lets an agent tell instantly that this produces invoice documents, not tax calculations or contracts like the sibling tools.

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 the discriminating condition between the two output flavors (Behörden with Leitweg-ID vs. Unternehmen as PDF/A-3) and notes it is free and keyless, plus a link to the human calculator. It does not say when to prefer this over a sibling like 'quittung', but within its own scope the selection guidance is clear.

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