Skip to main content
Glama

tomtom-routing

Calculate optimized routes using TomTom's routing tool. Specify origin, destination, route type, and travel mode for precise navigation. Includes traffic data, avoids specific features, and offers alternative routes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accelerationEfficiencyNoEfficiency during acceleration (0-1).
alternativeTypeNoWhen maxAlternatives is greater than 0, it allows the definition of computing alternative routes: finding routes that are significantly different from the reference route, or finding routes that are better than the reference route. Possible values are: `anyRoute` (returns alternative routes that are significantly different from the reference route.), `betterRoute` (only returns alternative routes that are better than the reference route, according to the given planning criteria (set by routeType). If there is a road block on the reference route, then any alternative that does not contain any blockages will be considered a better route. The summary in the route response will contain information (see the planningReason parameter) about the reason for the better alternative.) Note: The betterRoute value can only be used when reconstructing a reference route. Default value: `anyRoute` Other values: `betterRoute`
arriveAtNoArrival time in ISO format (e.g., '2025-06-24T17:00:00Z'). Cannot be used with departAt.
auxiliaryPowerInLitersPerHourNoAuxiliary power consumption for combustion vehicles in L/hr.
auxiliaryPowerInkWNoAuxiliary power consumption in kW for electric vehicles.
avoidNoRoute features to avoid. May increase travel time. Options: 'tollRoads','motorways','ferries','unpavedRoads','carpools','alreadyUsedRoads'. Accepts array of string(s).
chargeMarginsInkWhNoComma-separated charge margins in kWh for route planning.
computeBestOrderNoReorder waypoints for optimization. Use with multiple waypoints to find the most efficient route order.
computeTravelTimeForNoCalculate travel times for all segments ('all') or none ('none').
constantSpeedConsumptionInLitersPerHundredkmNoCombustion speed-to-consumption mappings: '50,6.3:130,11.5' (speed in km/h, consumption in L/100km).
constantSpeedConsumptionInkWhPerHundredkmNoEV speed-to-consumption mappings format: '50,8.2:130,21.3' (speed in km/h, consumption in kWh/100km).
consumptionInkWhPerkmAltitudeGainNoEnergy used per km of altitude gain.
currentChargeInkWhNoCurrent EV battery charge in kWh. Required for EV routing.
currentFuelInLitersNoCurrent fuel level in liters for combustion vehicles.
decelerationEfficiencyNoEfficiency during deceleration (0-1).
departAtNoDeparture time in ISO format (e.g., '2025-06-24T14:30:00Z'). Cannot be used with arriveAt.
destinationYesDestination coordinates. Obtain from geocoding for best results.
downhillEfficiencyNoEfficiency during downhill driving (0-1).
extendedRouteRepresentationNoAdditional routing data formats to include in the response.
fuelEnergyDensityInMJoulesPerLiterNoFuel energy density in megajoules per liter.
hillinessNoPreference for avoiding hills. Use 'low' for flatter routes.
includeTollPaymentTypesNoInclude toll payment types in the toll section. If a toll section has different toll payment types in its subsections, this toll section is split into multiple toll sections with the toll payment types. Possible values: all(Include toll payment types in the toll section.), none (Do not include toll payment types in the toll section). The value `all` must be used together with sectionType=toll. Default value: none
instructionsTypeNoInstruction format: 'text' (human-readable), 'coded' (machine-readable), 'tagged' (HTML).
languageNoLanguage code for instructions (e.g., 'en-US', 'de-DE').
maxAlternativesNoNumber of alternative routes (0-5). More alternatives = more options but larger response.
maxChargeInkWhNoMaximum EV battery capacity in kWh. Required for EV routing.
originYesStarting point coordinates. Obtain from geocoding for best results.
recuperationInkWhPerkmAltitudeLossNoEnergy recovered per km of altitude loss.
reportNoSpecifies which data should be reported for diagnostic purposes. A possible value is: `effectiveSettings`. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters, the default will be reflected where the parameter was not specified by the caller. Default value: effectiveSettings
routeRepresentationNoRepresentation of routes in response: 'polyline' (default, includes points), 'encodedPolyline' (compressed format), 'summaryOnly' (no points), 'none' (with computeBestOrder only). It cannot be used when `maxAlternatives` is set
routeTypeNoRoute optimization: 'fastest' (time-optimized), 'shortest' (distance-optimized), 'eco' (fuel-efficient), 'thrilling' (scenic).
sectionTypeNoHighlight specific road section types in response for route analysis: toll (toll roads), motorway (highways), tunnel, urban (city areas), country (rural areas), pedestrian (walking paths), etc.
supportingPointsNoAdditional coordinates that influence the route shape without being stops (format: 'lat,lon;lat,lon').
trafficNoInclude real-time traffic data for more accurate ETAs and route suggestions.
travelModeNoTransportation mode. Default: 'car'.
uphillEfficiencyNoEfficiency during uphill driving (0-1).
vehicleAdrTunnelRestrictionCodeNoADR tunnel restriction code for hazardous materials.
vehicleAxleWeightNoVehicle axle weight in kg for weight-restricted roads.
vehicleCommercialNoCommercial vehicle flag. Affects road access restrictions.
vehicleEngineTypeNoEngine type for fuel/energy consumption calculation.
vehicleHeadingNoHeading of the vehicle in degrees (0-359) for more accurate initial routing.
vehicleHeightNoVehicle height in meters. Used to avoid low bridges.
vehicleLengthNoVehicle length in meters. Affects maneuverability restrictions.
vehicleLoadTypeNoCargo type for hazardous materials routing.
vehicleMaxSpeedNoMaximum vehicle speed in km/h for commercial routing.
vehicleNumberOfAxlesNoNumber of axles on the vehicle. Used for toll calculations and restrictions.
vehicleWeightNoVehicle weight in kg. Important for truck routing restrictions.
vehicleWidthNoVehicle width in meters. Used to avoid narrow roads.
windingnessNoPreference for avoiding winding roads. Use 'low' for straighter routes.

Implementation Reference

  • MCP tool handler implementation for 'tomtom-routing'. Logs the request, calls getRoute service, returns JSON result or error.
    export function createRoutingHandler() { return async (params: any) => { logger.info( `πŸ—ΊοΈ Route: (${params.origin.lat},${params.origin.lon}) β†’ (${params.destination.lat},${params.destination.lon})` ); try { const result = await getRoute(params.origin, params.destination, params); logger.info(`βœ… Route calculated successfully`); return { content: [ { text: JSON.stringify(result, null, 2), type: "text" as const, }, ], }; } catch (error: any) { logger.error(`❌ Routing failed: ${error.message}`); return { content: [{ type: "text" as const, text: JSON.stringify({ error: error.message }) }], isError: true, }; } }; }
  • Zod input schema definition for the tomtom-routing tool, including origin, destination, options, vehicle specs, and section types.
    export const tomtomRoutingSchema = { origin: originCoordinateSchema.describe( "Starting point coordinates. Obtain from geocoding for best results." ), destination: destinationCoordinateSchema.describe( "Destination coordinates. Obtain from geocoding for best results." ), ...routingOptionsSchema, ...vehicleSchema, sectionType: sectionTypeSchema.describe( "Highlight specific road section types in response for route analysis: toll (toll roads), motorway (highways), tunnel, urban (city areas), country (rural areas), pedestrian (walking paths), etc." ), };
  • Registers the 'tomtom-routing' tool on the MCP server using the schema and handler.
    server.registerTool( "tomtom-routing", { title: "TomTom Routing", description: "Calculate optimal routes between locations", inputSchema: schemas.tomtomRoutingSchema, }, createRoutingHandler() );
  • Alternative Orbis registration of the 'tomtom-routing' tool on the MCP server.
    server.registerTool( "tomtom-routing", { title: "TomTom Routing", description: "Calculate optimal routes between locations", inputSchema: schemas.tomtomRoutingSchema, }, createRoutingHandler() );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tomtom-international/tomtom-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server