Book KSeF purchase invoice
Book a purchase invoice from KSeF as a cost.
MCP tool ifirma_write → book_ksef_purchase_invoice
write Confirm
Does what "Zaksięguj" does on a document from list_ksef_purchase_invoices. It works for VAT and corrective invoices; advance and final invoices are booked in an order and are refused. The cost then appears in Wydatki, Lista wydatków. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| ksef_number string required | string | KSeF number from list_ksef_purchase_invoices. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ifirma_write",
"arguments": {
"operation": "book_ksef_purchase_invoice",
"arguments": {
"ksef_number": "7010003987-20261012-AB12CD34EF56-7A"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
"booked": true,
"seller_number": "FV 118/2026",
"gross": 800
},
"isError": false
}