inFakt MCP server tool · Invoice drafts and approval
infakt_invoice_advance_next_prepare
Last updated: · Prepare Next Advance Invoice
Draft of the next advance invoice in PLN, paid in cash, with the lines of the order’s last advance.
What it does
The server’s own text, in Polish, written for the assistant. Names of other tools link to their pages.
Przygotuj kolejną fakturę zaliczkową PLN/cash z pozycjami ostatniej zaliczki grupy, bez utworzenia faktury.
When to use
Klient wpłaca kolejną zaliczkę na to samo zamówienie, a pierwsza zaliczka już istnieje (także wystawiona w inFakt).
What it returns
MCP czyta całą grupę z inFakt, wybiera ostatnią zaliczkę i ustala z niej nabywcę; inFakt kopiuje jej pozycje. Podgląd pokazuje wartość zamówienia, dotychczasowe wpłaty, bieżącą wpłatę i pozostałą kwotę. Grupa z fakturą końcową, w całości opłacona, w innej walucie albo z kilkoma stawkami VAT daje needs_input. Zmiana grupy przed zgodą unieważnia zgodę; zmiana w trakcie wystawiania daje ostrzeżenie w wyniku operacji.
How to use
previous_invoice_uuid dowolnej zaliczki z grupy, advance_amount jako tekst dziesiętny z walutą (wpłata na tej zaliczce, nie wartość zamówienia), daty RRRR-MM-DD, payment_method cash, currency PLN. Pozycji nie podawaj. infakt_invoice_approve zapisuje zaliczkę w inFakt jako szkic; wynik sprawdzaj przez infakt_invoice_operation_get.
Schema
infakt_meta_schema("invoice_draft"), przykłady: infakt_meta_examples("prepare_advance_next_invoice").
Related tools (per the server)
- infakt_invoice_advance_group_get - wpłaty i pozostała kwota przed wyborem kwoty
- infakt_invoice_approve - utworzenie po zgodzie użytkownika
- infakt_invoice_operation_get - wynik tworzenia
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_amount, advance_date, currency, invoice_date, not_income, payment_method, previous_invoice_uuid) | 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_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.