Skip to main content

Overview

Assign jobs to vehicles and determine the order in which each vehicle should visit its assigned jobs. Use this tool when the user needs to:
  • assign multiple deliveries or pickups to vehicles
  • plan routes for a fleet
  • determine the order of multiple stops
  • optimize a multi-vehicle routing solution
Do not use it for a single route. Use route. Do not use it only to compare distances or travel times between locations. Use table.

Input

Every vehicle must have a unique id. Every job must have a unique id and a location. Locations must use:
Each vehicle must have at least a start or an end. For a round trip, set both start and end to the same location:
If start or end is omitted, the vehicle may start or end anywhere.

Vehicle profiles

Each vehicle can use its own routing profile. Use:
when the user explicitly asks for a motorcycle or motorbike route. Otherwise, omit profile to use the default driving profile. For example:

Output

A simplified result looks like:
Use routes[].steps to determine:
  • which vehicle serves each job
  • the order in which jobs are visited
  • when each job is reached
A job step contains the job ID, arrival time, travel duration, and travel distance for reaching that job. Always check unassigned. Do not assume that every job will be assigned. If the user provides place names or addresses instead of coordinates, call geocode first for every location and use the selected coordinates in the optimization request.

Example

Prompt for an MCP-capable agent, e.g. Claude or Codex