Skip to main content
Glama
mapbox

Mapbox MCP Server

Official

Map Matching Tool

map_matching_tool
Read-onlyIdempotent

Match inaccurate GPS coordinates to the road network, returning clean routes aligned with roads, bike paths, or walkways. Useful for processing recorded trips or fleet tracking data.

Instructions

Snap GPS traces to roads using Mapbox Map Matching API. Takes noisy/inaccurate coordinate sequences (2-100 points) and returns clean routes aligned with actual roads, bike paths, or walkways. Useful for analyzing recorded trips, cleaning fleet tracking data, or processing fitness activity traces. Returns confidence scores, matched geometry, and optional traffic/speed annotations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoRouting profile for different modes of transport. Options: - driving: automotive based on road network - driving-traffic: automotive with current traffic conditions - walking: pedestrian/hiking - cycling: bicycledriving
overviewNoFormat of the returned geometry. Options: - full: Returns full geometry with all points - simplified: Returns simplified geometry - false: No geometry returnedfull
radiusesNoArray of maximum distances (in meters) each coordinate can snap to the road network. If provided, must have the same length as coordinates array. Default is unlimited. Use smaller values (5-25m) for high-quality GPS, larger values (50-100m) for noisy GPS traces.
geometriesNoFormat of the returned geometry. Options: - geojson: GeoJSON LineString (recommended) - polyline: Polyline with precision 5 - polyline6: Polyline with precision 6geojson
timestampsNoArray of Unix timestamps (in seconds) corresponding to each coordinate. If provided, must have the same length as coordinates array. Used to improve matching accuracy based on speed.
annotationsNoAdditional data to include in the response. Options: - speed: Speed limit per segment (km/h) - distance: Distance per segment (meters) - duration: Duration per segment (seconds) - congestion: Traffic level per segment (low, moderate, heavy, severe)
coordinatesYesArray of coordinate objects with longitude and latitude properties representing a GPS trace. Must include at least 2 and up to 100 coordinate pairs. Coordinates should be in the order they were recorded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
matchingsYes
tracepointsYes
Behavior4/5

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

Annotations indicate readOnlyHint, idempotentHint, and nondestructive behavior. The description adds that the tool returns confidence scores, matched geometry, and optional traffic/speed annotations, 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 three sentences: first states primary function, second describes inputs/outputs, third lists use cases and return details. Each sentence earns its place with specific, valuable information.

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 7 parameters and the presence of an output schema, the description covers the main return values (confidence, geometry, optional annotations). It does not mention error handling or performance, but is sufficiently complete for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100% with detailed descriptions. The description adds practical guidance for the radiuses parameter (recommended values for GPS quality), enhancing understanding beyond the schema.

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

Purpose5/5

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

The description clearly states the tool snaps GPS traces to roads using a specific API, listing realistic use cases (recorded trips, fleet tracking, fitness traces). This differentiates it from sibling tools like directions_tool or area_tool.

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

Usage Guidelines4/5

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

The description provides clear context ('useful for analyzing recorded trips...') and implies when to use it (noisy GPS data), but does not explicitly list when not to use it or mention alternative tools.

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