Create invoice
Issue an invoice for a client with products or free lines.
MCP tool fakturownia_write → create_invoice
write Confirm
Saves an invoice with the next number in your series. Lines use product_id and quantity, or name, tax, quantity and total_price_gross. Without department_id it uses your default company data. If automatic KSeF sending is on for this account, saving also sends the invoice to KSeF, which is legally binding. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| client_id integer required | integer | Client ID from list_clients or create_client. |
| positions array required | array | Lines: {product_id, quantity}, or {name, tax, quantity, total_price_gross}. |
| kind string | string | vat, proforma, advance, final, estimate, bill or receipt. Default: vat. |
| payment_to_kind integer | integer | Days until due. Use payment_to for a fixed date. |
| payment_to string | string | YYYY-MM-DD due date. |
| issue_date string | string | YYYY-MM-DD. Default: today. |
| sell_date string | string | YYYY-MM-DD or YYYY-MM. Default: issue date. |
| department_id integer | integer | Company or department that issues the invoice. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fakturownia_write",
"arguments": {
"operation": "create_invoice",
"arguments": {
"client_id": 4817,
"kind": "vat",
"payment_to_kind": 14,
"positions": [
{
"product_id": 2203,
"quantity": 2
}
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"id": 5120,
"number": "14/10/2026/1",
"kind": "vat",
"status": "issued",
"client_id": 4817,
"price_net": "1000.00",
"price_tax": "230.00",
"price_gross": "1230.00",
"currency": "PLN",
"payment_to": "2026-10-28",
"gov_status": null
},
"isError": false
}