trueway-directions2
The TrueWay Directions2 MCP server provides a robust routing service designed to determine the optimal route between multiple locations.
The TrueWay Directions2 MCP server offers a comprehensive routing solution for determining optimal paths between multiple locations. It is designed to provide the fastest and most efficient routes by considering real-time traffic conditions and user preferences. The server supports global road network coverage, allowing users to find routes anywhere in the world. It features route optimization, traffic considerations, and flexible route preferences, such as avoiding toll roads, highways, or ferries. Additionally, it provides detailed route data, including distance, duration, route geometry, and turn-by-turn directions, making it suitable for complex routing needs with multiple stops.
Features
- Global Road Network Coverage
- Route Optimization
- Traffic Considerations
- Flexible Route Preferences
- Comprehensive Route Data
MCP Tools
- FindDrivingRoute: Determine the best route with multiple stops, optimizing the order of stops if needed.
- FindDrivingPath: Determine the best route between a single origin and destination, optionally including waypoints.
Usage with Different Platforms
python
python
import requests
url = 'https://api.trueway.com/directions2'
params = {
'stops': 'lat1,lng1;lat2,lng2',
'optimize': True,
'avoid_highways': False,
'avoid_tolls': True,
'geometry_format': 'geojson'
}
response = requests.get(url, params=params)
print(response.json())
javascript
javascript
const axios = require('axios');
const url = 'https://api.trueway.com/directions2';
const params = {
stops: 'lat1,lng1;lat2,lng2',
optimize: true,
avoid_highways: false,
avoid_tolls: true,
geometry_format: 'geojson'
};
axios.get(url, { params })
.then(response => console.log(response.data))
.catch(error => console.error(error));