Skip to main content
Glama

Rechnung als Vorschau rendern

preview_invoice
DestructiveIdempotent

Render an Austrian invoice as a watermarked preview. Works without a facturo account; with a connected account the preview is an Entwurf the user also sees at facturo.at, nothing is numbered or sent. The user sees the preview as a card in the chat after each call. A new draft needs client.name (or client_id with a connected account) and at least one item; later calls pass draft_id plus only the fields that change. Returns the draft_id, the totals, the review_hash that finalize_invoice needs, and 'missing': what the real invoice still needs. It works with only a client name and one position.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNo
clientNoThe invoice recipient. The name is required for the first preview of a draft; the real invoice needs the address.
issuerNoThe sender (the user's own business). Everything is optional for a preview; missing mandatory fields render as placeholders and are listed under 'missing'. With a connected account the profile there wins; only an account without a company profile yet takes these fields.
draft_idNoId of a draft from an earlier preview_invoice result. Pass it to change that draft instead of starting a new one: client and issuer merge field by field, every other field given replaces the old value, items replace the whole list.
due_dateNoYYYY-MM-DD; default invoice_date + payment_days
fusstextNoText below the totals; default: the account's standard text. A 'bereits bezahlt' remark goes here as 'Der Rechnungsbetrag wurde bereits bezahlt.'
kopftextNoText above the items; default: the account's standard text
vat_rateNoVAT rate in percent (10 and 13 are the reduced Austrian rates). Omit to inherit: the client's last invoice's rate, else 20.
client_idNoId of an existing client of the connected facturo account (from search_clients). Use it instead of 'client' whenever the client exists; needs a connected account.
invoice_dateNoYYYY-MM-DD, default today
invoice_typeNo'honorarnote' for freelancers/Freiberufler who bill a Honorar; default 'normal'
payment_daysNoZahlungsziel in days, default 14; ignored when due_date is given
discount_typeNoGesamtrabatt on the whole document, deducted as its own line below the items (VAT is computed on the reduced amount). 'percentage' = discount_value is a percent of the net item total, 'fixed' = discount_value is an EUR amount (in the draft's price mode). Requires discount_value. Set it when the user grants a discount/Nachlass/Aktionscode on the whole invoice or offer; never bill a discount as a negative item. 'none' clears a discount set earlier. Not available on an Anzahlungsrechnung (the deposit share replaces it); a Storno inherits the cancelled invoice's discount automatically.
discount_valueNoDecimal as string: the percent ('25') or EUR amount ('100') per discount_type. Must be above 0, a percentage at most 100.
invoice_numberNoOnly without a connected account: the user's own invoice number, the next one in their sequence (e.g. '2026-014'). Ask the user for it, never invent one. A connected account numbers automatically.
reference_linesNoExtra reference lines in the header, e.g. 'Projekt: Dach Huber'
prices_include_vatNoUnit prices are gross (Brutto) amounts. Omit to inherit from the client's last invoice, else false.
service_period_endNoYYYY-MM-DD, Leistungszeitraum end
vat_exemption_typeNoOmit unless the user named one: a connected preview then picks the account's treatment (Kleinunternehmer setting, the client's last invoice, the account's usual mode, else 20%) and reports it. '' forces regular VAT. 'small_business' = Kleinunternehmer (no VAT, §6 Abs 1 Z 27 UStG), 'construction' = Reverse Charge Bauleistungen (§19 Abs 1a), 'eu_service' / 'eu_goods' = innergemeinschaftlich, 'healthcare' = §6 Abs 1 Z 19.
discount_descriptionNoLabel printed on the discount line, e.g. 'Rabatt' (default), 'Rabatt Aktionscode START25', 'Treuebonus'. The percentage or amount is printed next to it automatically, so leave it out of the label.
service_period_startNoYYYY-MM-DD, Leistungszeitraum start; default invoice_date

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?

Beyond the annotations it discloses substantial behavior: the preview is watermarked, a connected account turns it into an Entwurf visible at facturo.at, nothing is numbered or sent, and the user sees a card in chat after every call. That said, destructiveHint=true is left unelaborated — whether the draft persists without an account, and how to undo one, is not stated (discard_draft is never mentioned).

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?

Purpose and safety scope are front-loaded, then input requirements, then the update pattern, then return values — a logical order with no filler. Five dense sentences for a 21-parameter tool with nested objects is appropriately sized.

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, but the description covers the return payload explicitly (draft_id, totals, review_hash, and the 'missing' field), which is exactly what an agent needs to chain to finalize_invoice. Account-vs-no-account differences and the issuer-placeholder behavior are also addressed, so nothing material is left for the agent to guess.

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 95%, so per-field meaning is already carried by the schema and a baseline 3 applies. The description does add real value by stating conditional requirements the schema marks as optional (client.name or client_id plus at least one item for a new draft; draft_id for updates), but it does not add anything about the other 20 parameters.

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?

The first sentence gives a specific verb and resource ('Render an Austrian invoice as a watermarked preview') and immediately scopes what it is not: nothing is numbered or sent. Naming review_hash as the input finalize_invoice needs lets an agent separate this tool from the sibling that actually issues the 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?

The description spells out the call sequence: a new draft needs client.name (or client_id with a connected account) plus one item, while later calls pass draft_id and only changed fields. It also states the minimum viable input ('only a client name and one position') and the account-or-no-account split. It never explicitly contrasts with finalize_invoice beyond the review_hash handoff, so it falls just short of a full when/when-not statement.

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