Enable the Routes API in Google Cloud Console and obtain an API key with the Routes API enabled; note that the Routes API (v2) is distinct from the older Directions API
When constructing a route request, include the travelMode: DRIVE field and add an EVRouteParameters or routeModifiers block to signal EV routing; supply evOptimizationMode and optionally connectorType and currentChargeKwh if available
Set the computeAlternativeRoutes and specify intermediary waypoints for known charging stops, or rely on the API's EV routing to suggest stops when EVRouteParameters are provided
Parse the route response for legs and steps; EV-specific responses include travelAdvisory with fuelConsumptionMicroliters (or energy equivalent) and any added charging waypoints
Display range warnings or charging waypoints to the user using the navigationStatus or travelAdvisory fields in the route leg objects
Known gotchas
EV routing features in the Routes API require specific request fields and may be in preview or restricted availability; check current documentation for the exact request schema as it has evolved and not all EV parameters are GA
The Routes API charges per request and EV routing may be billed at a different SKU tier than standard routing; verify pricing in the Google Cloud billing documentation before scaling
Vehicle-specific range and consumption data must be provided by your application — Google does not maintain a vehicle database; inaccurate consumption parameters will produce routing suggestions that do not reflect the actual vehicle's range
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp