Skip to main content
Glama
mapbox

Mapbox MCP Server

Official

Directions Tool

directions_tool
Read-onlyIdempotent

Fetches turn-by-turn directions between multiple coordinates using Mapbox routing. Supports driving, walking, cycling profiles with traffic, vehicle restrictions, and alternative routes.

Instructions

Fetches directions from Mapbox API based on provided coordinates and direction method. For route planning and distance calculations, use geometries="none" to get compact responses. Only request full geometry (geometries="geojson") when you need to visualize the route on a map or provide detailed turn-by-turn navigation instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
excludeNoWhether to exclude certain road types and custom locations from routing. Multiple values can be specified as a comma-separated list. Available options: - All profiles: ferry, cash_only_tolls - Driving/Driving-traffic profiles only: motorway, toll, unpaved, tunnel, country_border, state_border or point(<lng> <lat>) For custom locations you can use Point exclusions (note lng and lat are space separated and at most 50 points are allowed) Note: country_border excludes all controlled country borders; borders within the Schengen Area are not excluded.
arrive_byNoThe desired arrival time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mmss±hh:mm, or YYYY-MM-DDThh:mm). This parameter is only available for the driving profile and is not supported by other profiles, not even driving-traffic. The travel time will be calculated based on historical and real-time traffic data.
depart_atNoThe departure time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mmss±hh:mm, or YYYY-MM-DDThh:mm). This parameter is only available for the driving and driving-traffic profiles. The travel time will be calculated based on historical and real-time traffic data.
max_widthNoThe max vehicle width, in meters. The Directions API will compute a route that includes only roads with a width limit greater than or equal to the max vehicle width. Must be between 0 and 10 meters. The default value is 1.9 meters. Only available for driving and driving-traffic profiles.
geometriesNoThe format of the returned geometry. Options: - none (default): no geometry object is returned at all, use this if you do not need all of the intermediate coordinates. - geojson: as GeoJSON LineString (might be very long as there could be a lot of points)none
max_heightNoThe max vehicle height, in meters. The Directions API will compute a route that includes only roads with a height limit greater than or equal to the max vehicle height. Must be between 0 and 10 meters. The default value is 1.6 meters. Only available for driving and driving-traffic profiles.
max_weightNoThe max vehicle weight, in metric tons (1000 kg). The Directions API will compute a route that includes only roads with a weight limit greater than or equal to the max vehicle weight. Must be between 0 and 100 metric tons. The default value is 2.5 metric tons. Only available for driving and driving-traffic profiles.
coordinatesYesArray of coordinate objects with longitude and latitude properties to visit in order. Must include at least 2 coordinate pairs (starting and ending points). Up to 25 coordinates total are supported.
alternativesNoWhether to try to return alternative routes (true) or not (false, default). Up to two alternatives may be returned.
routing_profileNoRouting profile for different modes of transport. Options: - mapbox/driving-traffic (default): automotive with current traffic conditions - mapbox/driving: automotive based on typical traffic - mapbox/walking: pedestrian/hiking - mapbox/cycling: bicyclemapbox/driving-traffic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
uuidNo
routesNo
waypointsNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnly, idempotent, and non-destructive behavior. The description adds value by explaining performance implications of geometry options (compact vs detailed responses) and referencing the external Mapbox API, which is beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, no extraneous information, and front-loaded with the core purpose. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich input schema (10 parameters all described), annotations, and presence of output schema, the description is fairly complete. It lacks only a comparison to sibling tools, which falls under usage guidelines.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with each parameter having detailed descriptions. The description adds minimal extra meaning, mainly reinforcing the geometries parameter's use cases. Baseline is 3, and it does not significantly exceed that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it fetches directions based on coordinates and direction method, which distinguishes it from other tools. However, it does not explicitly differentiate from sibling tools like distance_tool or map_matching_tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description only provides usage guidance for the geometries parameter (when to use 'none' vs 'geojson'), but lacks any guidance on when to use this tool versus alternative tools (e.g., distance_tool, map_matching_tool). No alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/mapbox/mcp-server'

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