--- name: juice-receipt description: Logs a fuel fill-up or EV charge in Juice (the iPhone fuel and charging log) from a photo of the receipt, the pump display or the charger screen, through the Juice connector's log_fill_up tool. Use it whenever the user sends such a photo while the Juice connector is available, even with no text at all or with only a number (that number is the odometer reading), and whenever they ask to log, add or record a fill-up, tank or charge from a receipt. --- # Log a receipt in Juice The user wants the least possible typing: a receipt photo and maybe the odometer reading is the whole request. Read the receipt, log it with the Juice connector's `log_fill_up` tool, and answer in one line. Ask a question only when something Juice needs is genuinely missing, or when Juice itself objects. ## 1. Read the receipt Take from the image, as printed: - **Date and time** of the purchase (the stamp with a time beside it — not a promo validity date or opening hours). - **Station** — brand and place, e.g. "Shell Brno Hradecká". - **Fuel grade / product** — "Natural 95", "Super 98", "Diesel", "Efecta Diesel", "E10", "AdBlue"… - **Quantity and its unit** — litres, US or imperial gallons, or kWh. - **Price per unit** — per litre, per gallon or per kWh. - **Total paid for the fuel or charging line**, after any discount on that line. - **Currency.** Only the fuel or charging line counts: a coffee or a car wash on the same receipt is not part of the fill-up (mention it in your reply if you like, but don't add it to the total). Leave card numbers, loyalty ids, approval codes and the cashier's name out of everything you send — none of it belongs in a fuel log. If a value is unreadable, don't guess it: Juice can compute the third of amount, total and unit price from the other two, so only ask when fewer than two are readable. ## 2. The number A bare number from the user is the **odometer** reading. Pass it as `trip_distance` instead when they say it's a trip ("trip", "since last fill", "ujeto") or when it is far below the vehicle's last logged odometer from `list_vehicles`. No number at all: ask for the odometer reading. Juice can't save a fill-up without one; called without it, `log_fill_up` saves nothing and answers with its own estimate from the user's usual driving, which you can offer ("about 52,300 km — is that right?"). ## 3. Vehicle and units - One active vehicle: leave `vehicle` out. Several: call `list_vehicles` and pick the one that can log this energy (a charge only goes to an electric car or a plug-in hybrid; diesel vs petrol by make and model when it's obvious). Ask which one only if it's still ambiguous — one short question. - Units follow the receipt and the user. Gallons and dollars → `volume_unit: "gal_us"` and `distance_unit: "mi"`; imperial gallons → `"gal_imp"`; litres → `"l"`. When the distance unit isn't clear from the user, `list_vehicles` with the matching `units` shows the last odometer in that unit — a reading that fits it tells you km or mi. ## 4. Call `log_fill_up` | Parameter | Value | |---|---| | `energy` | `"fuel"` or `"charge"` | | `date` | ISO 8601 with the receipt's local offset when it shows a time (`2026-11-20T07:42:00+01:00`), else `YYYY-MM-DD` | | `odometer` or `trip_distance` | from step 2, in `distance_unit` | | `amount` | litres / gallons in `volume_unit`, or kWh | | `total_price` | the fuel line's total paid | | `unit_price` | only as printed, and left out when a discount was applied (the total is what was paid) | | `currency` | ISO code from the receipt, e.g. `CZK`, `EUR`, `USD` | | `station` | from step 1 | | `fuel_grade` | the product as printed — fuel only, never on a charge | | `is_full` | `true` unless the user says it wasn't a full tank or charge | `fuel_grade` is new on the Juice connector. If the tool's schema has no `fuel_grade` parameter yet, put the grade at the start of `note` instead ("Natural 95"), so it isn't lost. ## 5. When Juice objects If the answer is `saved: false` with `warnings` — a likely duplicate, more than the tank or battery holds, an odometer out of order, an implausible jump or consumption — nothing was saved. Tell the user what Juice flagged in one sentence, with the numbers it returned, and call again with `confirm: true` only if they say yes. A duplicate usually means it's already logged: say so and stop unless they insist. ## 6. Reply One line, in the user's language and units, e.g.: > Logged: 42.3 l Natural 95 at Shell Brno, 1,680 CZK, odometer 52,340 km — 6.4 l/100 km. Include the consumption only when Juice returns one. Several receipts in one message: log them oldest first (odometer order), then one line each. If the tool answers that AI agents need Juice Pro, or isn't connected, say so plainly — the connector is set up at https://juicelog.com/#ai.