Generate mileage log
generate_mileage_logUse this when the user wants a mileage log, mileage log template, mileage log for taxes, printable mileage log, mileage log in Excel, or mileage reimbursement report from trips they drove ("turn these trips into a mileage log for my taxes", "reconstruct my mileage log from my calendar"). Takes typed trips (date, from, to, purpose, miles or odometer start/end), recurring trips (for example weekdays in a month) and/or an attached CSV/XLSX file. Applies the IRS standard mileage rate for each trip's date (2025: 70 cents; Jan-Jun 2026: 72.5 cents; Jul-Dec 2026: 76 cents per business mile; medical, moving and charity rates) or a custom employer rate, checks odometer continuity, flags commuting and missing purposes, and totals by month, purpose and client. Returns a PDF mileage log and an XLSX file. Does not look up distances between addresses, track GPS, or give tax advice. Do not use for a single quick mileage total with no trip list (use calculate_mileage_reimbursement).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_mileage_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Optional trip spreadsheet the user attached (CSV, TSV or XLSX) with columns such as Date, From, To, Purpose, Miles, or Odometer start and Odometer end, e.g. trips.xlsx. | |
| trips | No | Typed trips, one per drive, e.g. [{"date":"2026-10-05","from":"Office","to":"Client A","purpose":"Sales meeting","miles":12.4}]. | |
| vehicle | No | Optional vehicle description printed on the log, e.g. "2021 Toyota Camry". No VIN or plate needed. | |
| log_title | No | Title printed on the log, e.g. "October 2026 mileage". | |
| recurring | No | Repeating trips, e.g. "every weekday in October, 18 mi to the clinic" -> [{"start_date":"2026-10-01","end_date":"2026-10-31","to":"Clinic","purpose":"Patient visits","miles":18}]. | |
| skip_dates | No | Dates to leave out of recurring trips (holidays, PTO), YYYY-MM-DD, e.g. ["2026-10-12"]. | |
| driver_name | No | Optional driver name printed on the log, e.g. "Dana Lee". | |
| regular_workplace | No | Name of the user's regular office or workplace, e.g. "Main St office", to flag home-to-office commuting. | |
| year_end_odometer | No | Odometer at the end of the year (or of the log period), e.g. 52120. | |
| year_start_odometer | No | Odometer at the start of the year (or of the log period), e.g. 38500. With year_end_odometer it gives total miles and business-use percentage. | |
| custom_rate_per_mile | No | Employer or contract reimbursement rate in US dollars per mile for business trips, e.g. 0.60. Leave out to use the IRS standard mileage rate for each trip date. | |
| home_office_is_principal_place | No | true if the user's home office is their principal place of business (then trips from home are not flagged as commuting). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| flags | Yes | ||
| notes | Yes | ||
| title | Yes | ||
| period | Yes | ||
| source | Yes | ||
| totals | Yes | ||
| preview | Yes | ||
| by_month | Yes | ||
| by_client | Yes | ||
| downloads | Yes | ||
| by_purpose | Yes | ||
| rate_basis | Yes | ||
| rates_used | Yes | ||
| vehicle_use | Yes |