inFakt MCP server tool · Invoice drafts and approval
infakt_invoice_final_prepare
Last updated: · Prepare Final Invoice
Draft of a final invoice in PLN, paid in cash, settling all advances of an order.
What it does
The server’s own text, in Polish, written for the assistant. Names of other tools link to their pages.
Przygotuj fakturę końcową PLN/cash rozliczającą całą grupę zaliczek, bez utworzenia faktury.
When to use
Klient zapłacił zaliczki na zamówienie i trzeba je rozliczyć fakturą końcową (rozliczeniową).
What it returns
MCP czyta całą grupę z inFakt, wybiera ostatnią zaliczkę i ustala z niej nabywcę oraz rodzaj sprzedaży; inFakt kopiuje jej pozycje. Podgląd pokazuje wartość zamówienia, wpłacone zaliczki i kwotę do zapłaty na końcowej (0, gdy zaliczki pokryły całe zamówienie). Grupa z fakturą końcową, w innej walucie, z kilkoma stawkami VAT albo z nadpłatą daje needs_input. Zmiana grupy przed zgodą unieważnia zgodę; zmiana w trakcie wystawiania daje ostrzeżenie w wyniku operacji.
How to use
advance_invoice_uuid dowolnej zaliczki z grupy, invoice_date i sale_date RRRR-MM-DD, payment_method cash, currency PLN. Kwot ani pozycji nie podawaj. infakt_invoice_approve zapisuje końcową w inFakt jako szkic; wynik sprawdzaj przez infakt_invoice_operation_get. Zapłatę gotówką zapisz potem przez infakt_mark_invoice_as_paid (invoice_type final).
Schema
infakt_meta_schema("invoice_draft"), przykłady: infakt_meta_examples("prepare_final_invoice").
Related tools (per the server)
- infakt_invoice_advance_group_get - wpłaty i pozostała kwota grupy
- infakt_invoice_approve - utworzenie po zgodzie użytkownika
- infakt_invoice_operation_get - wynik tworzenia
- infakt_mark_invoice_as_paid - zapis zapłaty końcowej
Parameters
Fields of the params object. Types and field descriptions come from the schema the server publishes in tools/list.
| Parameter | Type | Required | Description |
|---|---|---|---|
draft_pid | string | no | |
expected_revision | integer (≥ 1) | no | |
invoice | object (advance_invoice_uuid, currency, invoice_date, payment_method, sale_date) | no |
Access kind and annotations
Write through a draft and approval: the tool builds a draft outside inFakt; the document is created after the user approves it
readOnlyHint: falsewrite: changes data or statedestructiveHint: truedestructive: may overwrite or delete data, or cannot be undoneidempotentHint: falsenon-idempotent: each call may add something newopenWorldHint: falseworks only within the inFakt account
OAuth scopes the tool requires:
api:invoices:writeapi:invoices:readapi:account:read
Related tools
- infakt_invoice_approve – Shows the full draft preview and waits for the user’s decision; the only way a draft becomes a document.
- infakt_invoice_operation_get – Result of an issue operation; creates no invoice and starts no sending.
- infakt_mark_invoice_as_paid – Marks an invoice as paid on a given date, no earlier than the issue date.
- infakt_meta_schema – YAML schema of a resource.
- infakt_meta_examples – Example calls for an operation.
- infakt_invoice_advance_group_get – An order’s advance invoice group: payments, order value, remaining amount and final invoice.