Skip to main content

Overview

Calculate a route between two locations. Use this tool when the user needs to:
  • calculate driving distance
  • estimate travel time
  • get a route between two locations
  • get route geometry
  • understand which roads a route uses
  • avoid specific road types
Do not use it for comparing many origin-destination pairs. Use table instead. Do not use it for assigning jobs to vehicles or ordering multiple stops. Use optimize instead.

Input

Coordinates must use:
For example:

Motorcycle routing

profile is optional. Set it to "motorcycle" when the user explicitly asks for a motorcycle or motorbike route. Otherwise, omit profile to use the default driving profile.

Avoiding roads

Use exclude when the user explicitly asks to avoid a road type. Supported values:
  • toll
  • motorway
  • ferry
For example:
Road avoidance is a preference, not a guarantee. The engine avoids the specified road type when a reasonable alternative exists.

Output

  • distance_meters — route distance in meters
  • duration_seconds — estimated travel time in seconds
  • profile — routing profile used
  • geometry — simplified encoded polyline for the route
  • summary.roads — main roads used by the route
  • summary.tolls — whether the route uses toll roads
  • summary.ferry — whether the route includes a ferry crossing
If the user provides place names or addresses instead of coordinates, call geocode first.

Example

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