Skip to main content
Glama

MaxRechnung

Vorlage in Rechnungsentwurf einfügen

add_invoice_items_from_template

Tarif: ab Pro (darunter antwortet die API mit plan_required).

Vorlage in Rechnungsentwurf einfügen

Hängt eine Positions-Vorlage (item_template_id, optional mit abweichender quantity) oder ein Set (item_template_set_id) an den Entwurf an. Der Preis wird wie im Editor in den Preismodus der Rechnung umgerechnet (netto ⇄ brutto mit dem USt.-Satz der Position; ohne USt.-Ausweis gilt netto). Eine einzelne leere Startposition wird ersetzt. Wie im Editor: eine archivierte Positions-Vorlage lässt sich nicht einzeln einfügen (in Sets bleibt sie); eine Vorlage oder ein Set mit Kundenbindung (customer_ids) nur, wenn der Empfänger des Entwurfs genau einem dieser Kunden entspricht. Braucht invoices:draft und templates:read. Ohne Idempotency-Key hängt jeder Aufruf erneut an.

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": {
      "id": "<id>"
    },
    "name": "add_invoice_items_from_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesInterne `id` der Rechnung (UUID), nicht die Belegnummer. Zu einer Nummer (z. B. `RE-2026-0004`) liefert `GET /invoices?number=…` (MCP: `list_invoices` mit `number`) die `id`.
bodyNoJSON-Request-Body.
_idempotency_keyNoOptional. Geht als Header `Idempotency-Key` an die API: derselbe Wert mit demselben Aufruf liefert 24 Stunden lang die erste Antwort zurück, statt den Vorgang zu wiederholen. Bei einem Wiederholversuch denselben Wert schicken.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: price is converted into the invoice's price mode (net/gross using the line's VAT rate, net when no VAT), a single empty starter line is replaced, archived templates behave differently inside sets, and repeated calls without Idempotency-Key append again. This is exactly the side-effect information an agent needs before mutating a draft. Nothing contradicts readOnlyHint=false / destructiveHint=false.

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 plan gate, then purpose, then behavior rules, which is a sensible order. The repeated heading line duplicates the title and costs a sentence, and the price-conversion explanation is dense, but nearly every sentence carries operational information.

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?

For a nested-body mutation tool with no output schema, the definition covers plan gating, permissions, pricing semantics, line replacement, template visibility rules and idempotency. The only absent piece is what the returned draft looks like, which the tool's lack of an output schema leaves unspecified but is not essential for correct invocation.

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 meaning the schema does not: quantity only applies with item_template_id, and omitting _idempotency_key has the concrete consequence of duplicating the append. It also explains the id/Belegnummer distinction indirectly via the list_invoices hint in the schema.

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: appends an item template (with optional quantity) or a template set to an existing invoice draft. The one-line summary in the description restates the title, but the follow-up sentences name the exact parameters that select each mode, so an agent can distinguish this from create_invoice_from_template and update_invoice_draft.

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 concrete preconditions: plan must be Pro or higher (otherwise plan_required), the draft must exist, and the caller needs both invoices:draft and templates:read. It also gives exclusions (archived template cannot be inserted alone; customer-bound templates only when the recipient matches). It does not explicitly compare against sibling routes such as create_invoice_from_template or update_invoice_draft, so 4 rather than 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.

Resources