Send invoice to KSeF
Send one issued invoice to the Polish KSeF e-invoicing system.
MCP tool ifirma_write → send_invoice_to_ksef
Does what "Wyślij do KSeF" does and returns the first status, "Przekazana do wysyłki"; the KSeF number appears once the Ministry of Finance accepts it, so read it with get_invoice. KSeF must already be connected in the account. After sending, iFirma does not allow editing or deleting the invoice, and the issue date cannot be later than the sending date. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ifirma_write",
"arguments": {
"operation": "send_invoice_to_ksef",
"arguments": {
"invoice_id": 1
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_id": 7020118,
"ksef_status": "queued",
"ksef_number": null
},
"isError": false
}