omni_gas_mileage_mpg
Calculates exact gas mileage in US MPG, Imperial MPG, and L/100km, plus fuel cost per mile and fill-up totals from miles driven, gallons pumped, and fuel price.
Instructions
Gas Mileage (MPG / L/100km) & Fuel Cost Calculator. Calculate exact gas mileage in US MPG, Imperial MPG, and Liters per 100km, cost per mile, and annual fuel expense. Discipline: PHYSICS. Governing mathematical model / formula: US MPG = Miles Driven / Gallons Consumed | L/100km = 235.215 / US MPG.
USAGE GUIDELINES:
WHEN TO USE: Invoke for deterministic calculation of us_mpg_result (Fuel Economy (US MPG)), metric_fuel_economy (Metric Consumption (L/100km)), cost_per_mile_fuel (Fuel Cost per Mile), fillup_total_cost (Total Fill-Up Cost) using trip_odometer_miles (Miles Driven Between Fill-ups in miles), gallons_pumped (Gallons Pumped into Tank in gallons), fuel_price_per_gal (Fuel Price per Gallon). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.
WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.
DISAMBIGUATION & BOUNDARIES:
Use this dedicated specialist tool for 'Gas Mileage (MPG / L/100km) & Fuel Cost Calculator' rather than generic dispatchers like omni_universal_query.
For multi-calculation chained jobs, use 'omni_batch_calculate'.
To inspect schema fields, see 'omni_describe_solver'.
BEHAVIOR & SAFETY:
Pure deterministic computation with machine floating-point precision.
Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.
Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.
RETURNS:
Structured JSON object containing:
status (string): "success" on valid execution or "error" if validation fails
calculator (string): "gas-mileage-mpg"
category (string): "physics"
name (string): "Gas Mileage (MPG / L/100km) & Fuel Cost Calculator"
formula (string): Governing mathematical formula string
inputs (object): Echoed input parameter dictionary with applied defaults
metrics (object): Dictionary of computed outputs:
metrics.us_mpg_result (Fuel Economy (US MPG)): Formatted display string (e.g. '26.95 MPG')
metrics.metric_fuel_economy (Metric Consumption (L/100km)): Formatted display string (e.g. '8.73 L/100km')
metrics.cost_per_mile_fuel (Fuel Cost per Mile): Formatted display string (e.g. '$0.135 / mile')
metrics.fillup_total_cost (Total Fill-Up Cost): Formatted display string (e.g. '$46.72')
execution_time_ms (number): Latency in milliseconds.
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": "omni_gas_mileage_mpg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gallons_pumped | No | Gallons Pumped into Tank (gallons). Exact fuel gallons from gas station receipt. Default: 12.8. Min: 1. Max: 100. | |
| fuel_price_per_gal | No | Fuel Price per Gallon. Current pump price per gallon. Default: 3.65. Min: 1.5. Max: 9. | |
| trip_odometer_miles | No | Miles Driven Between Fill-ups (miles). Miles on trip odometer when refueling. Default: 345. Min: 20. Max: 1500. |