Skip to main content
Glama

MaxRechnung

Rechnung stornieren

cancel_invoice
Destructive

Tarif: in jedem Tarif (Free, Pro, Business).

Rechnung stornieren

Stellt eine Stornorechnung (Nummernkreis ST-) aus, die {id} 1:1 mit umgekehrten Vorzeichen neutralisiert. Die Ursprungsrechnung erhält den Status void. Erhaltene Zahlungen bleiben ihr zugeordnet, amount_open wird negativ (Erstattung offen); die Rückzahlung erfasst POST /payments mit negativem Betrag. Ein Skonto-Ausgleich war kein Geld und wird mit dem Storno storniert (payment.cancelled). Anders als bei der Korrektur ist keine weitere Bearbeitung nötig. Die Antwort ist der Stornobeleg: type: cancellation, ebenfalls status: void (beide Belege sind abgeschlossen), negierte Einzelpreise, corrected_invoice verweist auf die Ursprungsrechnung.

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": "cancel_invoice"
  }
}

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`.
_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.2/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes well beyond that: the original is voided rather than deleted, received payments stay attached, `amount_open` turns negative and the actual refund must be booked separately via POST /payments with a negative amount, and Skonto settlements are cancelled as `payment.cancelled`. That is concrete consequence information an agent cannot get from the annotations.

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?

Dense and front-loaded with the mechanism, but the repeated heading 'Rechnung stornieren' and the leading tariff note are low-value padding relative to the rest. The behavioral payload (void semantics, negative amount_open, refund via POST /payments, response shape) is compact and readable, so little genuine waste.

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?

There is no output schema, and the description compensates by describing the returned cancellation document (`type: cancellation`, `status: void`, negated unit prices, `corrected_invoice` pointer to the original). Combined with the mutation's side effects on payments and the open amount, an agent has enough to invoke this correctly and predict the outcome.

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 coverage is 100%, and the schema already explains that `id` is the UUID (not the document number) including how to resolve a number via list_invoices, and what the idempotency key does. The description adds nothing parameter-specific beyond repeating `{id}` in the neutralization sentence, so the baseline of 3 applies.

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 ('Rechnung stornieren') and describes the mechanism precisely: a cancellation document in the ST- number range that neutralizes {id} 1:1 with reversed signs and sets the original to `void`. It also explicitly separates itself from the correction path ('Anders als bei der Korrektur ist keine weitere Bearbeitung nötig'), so an agent can distinguish it from create_correction without opening another schema.

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?

The description implies the situation (a finalized invoice that must be fully reversed rather than corrected) and names the correction workflow as the contrasting path, plus states plan availability (Free/Pro/Business). However, it never says the explicit selection rule against create_correction or delete_invoice_draft, nor does it state preconditions such as the invoice needing to be issued rather than a draft.

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