Add expense

Add a cost document by hand: goods purchase, business cost or phone and internet bill.

MCP tool ifirma_write → add_expense

write Confirm

Adds one cost document with the amounts per VAT rate. KSeF marking is required: number (with ksef_number), offline, bfk or di. The seller is matched by contractor_id or NIP. The cost goes into your records. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: add_expense
NameTypeDescription
type string required string goods_purchase, business_cost_invoice or phone_internet.
invoice_number string required string Number printed on the supplier document.
expense_name string required string Name of the expense.
issue_date string required string YYYY-MM-DD.
ksef_marking string required string number, offline, bfk or di.
ksef_number string string Required when ksef_marking is number.
contractor_id string string Contractor ID from list_contractors.
net_23 number number Net amount at 23%. The same for net_8, net_5, net_0 and net_exempt.
vat_23 number number VAT amount at 23%. The same for vat_8 and vat_5.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ifirma_write",
    "arguments": {
      "operation": "add_expense",
      "arguments": {
        "type": "type",
        "invoice_number": "invoice number",
        "expense_name": "expense name",
        "issue_date": "issue date",
        "ksef_marking": "ksef marking"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "id": 3310027,
    "type": "phone_internet",
    "invoice_number": "2026/10/0042",
    "net": 81.3,
    "vat": 18.7,
    "gross": 100
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.