Route, Assignment & Load Planner
route_optimizerPlans who goes where, in what order, in which vehicle. From stops (lat/lng or a road distance matrix) and vehicles it returns each vehicle's ordered stops with arrival/leave times, km, load, Google Maps links and GeoJSON, respecting delivery time windows, capacity (weight and volume), shift times, max stops/km, skills, stops locked to a vehicle, open routes and mid-day re-planning. Also: savings vs the user's current plan, vs driver instinct and vs list order; stops that cannot be served with the reason; address sanity checks; optimal technician-to-job assignment (skills, jobs per person); and loading items into the fewest vehicles with the proven minimum. Benchmarked within ~1.3% of best-known on Solomon/Uchoa instances, optimal on TSPLIB tours tested. Decision cards first. Up to 300 stops; larger: route_optimizer_get_engine.
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": "route_optimizer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | No | Assignment: id, lat, lng, skills. | |
| seed | No | ||
| depot | No | {lat, lng} of the depot/warehouse, or its id in matrix_ids. | |
| items | No | Load packing: id, weight (or qty), volume, count. | |
| stops | No | One row per stop: id, lat, lng (or an id in matrix_ids), demand, volume, service_minutes, window_start, window_end, skills, vehicle (lock), priority, status. No names/phones/addresses. | |
| day_end | No | 20:00 | |
| workers | No | Assignment: id, lat, lng, skills, max_jobs. | |
| currency | No | INR | |
| vehicles | No | id, capacity, volume_capacity, shift_start, shift_end, start_lat/lng (or current_lat/lng + now for mid-day), end_lat/lng, skills, max_stops, max_km, cost_per_km, cost_per_hour, fixed_cost, count. Default: one vehicle. | |
| day_start | No | 08:00 | |
| objective | No | distance | |
| speed_kmh | No | ||
| time_unit | No | auto | |
| bin_volume | No | ||
| iterations | No | Improvement rounds (default scales with stops; fixed rounds = repeatable). | |
| matrix_ids | No | ||
| cost_per_km | No | ||
| road_factor | No | ||
| time_matrix | No | Optional road travel times (minutes), same shape as distance_matrix. | |
| bin_capacity | No | Capacity of identical loads. | |
| cost_per_hour | No | ||
| distance_unit | No | km | |
| current_routes | No | The user's existing plan: [{vehicle, stops: [stop ids in order]}]. | |
| currency_symbol | No | ||
| distance_matrix | No | Optional road distances (km) from a router; rows/cols follow matrix_ids. | |
| include_geojson | No | ||
| return_to_depot | No | ||
| assignment_costs | No | Optional workers x jobs costs (matrix or [{worker, job, cost}]). | |
| minimize_vehicles | No | Use as few vehicles as possible first (then shortest). | |
| time_limit_seconds | No | ||
| default_service_minutes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alerts | No | ||
| routes | No | ||
| status | Yes | 1 = ok, 0 = nothing could be planned | |
| geojson | No | ||
| message | No | ||
| summary | No | ||
| metadata | Yes | ||
| decisions | Yes | Plain-language cards, priority order. Relay these first. | |
| load_plan | No | ||
| assignment | No | ||
| comparison | No | ||
| assumptions | No | ||
| address_checks | No | ||
| unserved_stops | No | ||
| data_quality_report | No |