Add a fill-up
add_fuel_entryAdds a fill-up (fuel, LPG, CNG or charging) to one vehicle's Nenpi log, for example from a photo of a receipt. Call get_entry_hints first for the odometer, energy carrier and station. Confirm the values with the user before calling, especially fullTank and odometerKm. Nothing is overwritten: the tool only adds. After saving, repeat to the user what was saved (date, amount, quantity, odometer) and give them entryUrl, where they can correct or delete the entry. If 'saved' is false, read the warning: a matching entry already exists. A warning ODOMETER_OUT_OF_ORDER with 'saved' true means the entry was saved but its odometer contradicts other readings and is left out of consumption: tell the user.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vehicleId": "<vehicleId>",
"date": "<date>",
"energyCarrier": "<energyCarrier>",
"amount": "<amount>",
"quantity": "<quantity>",
"fullTank": "<fullTank>"
},
"name": "add_fuel_entry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day of the fill-up (YYYY-MM-DD), at most tomorrow. | |
| note | No | Free-text note, at most 2000 characters. Optional. | |
| amount | Yes | Total paid, in the vehicle's currency (list_vehicles), with no more decimal places than the currency has (2 for PLN and EUR, 0 for JPY). | |
| vendor | No | Station, such as 'Orlen' or 'Shell Puławska'; reuse the spelling from recentVendors in get_entry_hints. At most 120 characters. | |
| currency | No | ISO 4217 code of the amount. Only when list_vehicles shows the vehicle without a currency: the first amount sets it for good. Otherwise omit it, all amounts are in the vehicle's currency. | |
| fullTank | Yes | True if the tank was filled up to the brim (the pump nozzle clicked off). Fuel consumption is computed between full tanks, so ask the user if unsure: a receipt does not say it. | |
| quantity | Yes | Amount of fuel: litres for PETROL, DIESEL and LPG, kg for CNG, kWh for ELECTRICITY. At most 3 decimal places. | |
| unitPrice | No | Price per litre, kg or kWh as printed on the receipt, at most 4 decimal places. Optional: Nenpi can work it out from amount and quantity. | |
| vehicleId | Yes | Vehicle id (UUID) from list_vehicles. Never guess it or reuse a name. | |
| odometerKm | No | Odometer at the fill-up, in km. Strongly recommended with fullTank: without it this fill-up cannot close a consumption segment. Ask the user; never invent it. get_entry_hints gives the latest known reading, which is only a lower bound. | |
| energyCarrier | Yes | What was filled up. Usually the same as lastFuel.energyCarrier from get_entry_hints; LPG cars fill up both LPG and PETROL, so follow the receipt. | |
| missedPrevious | No | True only if the user says that an earlier fill-up was not recorded in Nenpi, so the consumption chain restarts here. Default false. | |
| confirmDuplicate | No | Set to true only after the user confirmed that this is a separate entry, when a previous call returned the warning POSSIBLE_DUPLICATE. Never set it on the first call. |