Skip to main content
Glama

match_trace

Snap a recorded GPS trace to the road network and say what it actually travelled over. Provide shape (2 to 2000 recorded points, oldest first) or encoded_polyline (the same trace as a polyline6 string) — not both — plus the costing it was travelled under: "auto" (default), "truck", "bicycle", "pedestrian" or "motor_scooter". Costing decides which roads the trace may match onto, so a walk matched as "auto" snaps to the carriageway rather than the footpath. Returns the matched path as geometry_polyline6 (the snapped roads, not your raw points) with its distance_m and duration_s, then the roll-ups: by_road_class and by_admin (distance and time, longest first), by_surface (distance), and toll, bridge and tunnel totals. This is how you turn a dashcam or telematics log into a report — which country and region the driving happened in, how much of it was motorway, how much was tolled, how much was unpaved. Honesty: the roll-ups are summed per matched road segment, so they need not add up to distance_m exactly, and segments the map records no surface or admin area for are left out of that breakdown rather than filed under a guess — an entry in by_admin with null codes is exactly that, counted and not attributed. Needs the MapMap gateway (GATEWAY_URL + GATEWAY_API_KEY); there is no direct-backend fallback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapeNoThe trace as an ordered list of recorded points, oldest first. Between 2 and 2000 points. Provide this or `encoded_polyline`.
costingNoCosting model the trace was travelled under: `auto` (default), `truck`, `bicycle`, `pedestrian` or `motor_scooter`. It decides which roads the trace may be matched onto, so a walked trace matched as `auto` snaps to the carriageway rather than the path.
encoded_polylineNoThe trace as a Google encoded polyline with six digits of decimal precision (polyline6) — the geometry `route` and `match_trace` themselves return. Provide this or `shape`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tollYesTolled portion of the matched path.
bridgeYesBridge portion of the matched path.
tunnelYesTunnel portion of the matched path.
costingYesCosting the trace was matched under.
summaryYesOne-line human summary of the match, for reading aloud.
by_adminYesDistance and time by administrative area, longest first. An entry whose codes are all null covers segments the graph could not place in any admin area — counted honestly rather than guessed at.
by_surfaceYesDistance by road surface (`paved`, `paved_smooth`, `gravel`, …), longest first. Empty when the graph records no surface for any matched segment.
distance_mYesLength of the matched path in metres.
duration_sYesTravel time along the matched path in seconds, from the engine's own time model.
edge_countYesHow many road segments the trace matched onto.
by_road_classYesDistance and time by road class (`motorway`, `primary`, `residential`, …), longest first.
geometry_polyline6YesThe matched path as a Google encoded polyline with six digits of decimal precision (polyline6). This is the trace snapped to real roads, not the raw input.

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and meets it: it discloses the costing mismatch effect, the roll-up summation caveat, omission of missing surface/admin data, and the hard gateway/auth requirement with no fallback. This goes beyond basic operation and helps an agent set expectations.

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 long but every sentence earns its place: it flows from purpose to input to output semantics, then caveats and infrastructure. The 'Honesty:' paragraph front-loads important accuracy caveats rather than burying them.

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

Completeness5/5

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

For a complex map-matching tool with three parameters and an output schema, the description covers input selection, output composition, aggregation caveats, and deployment prerequisite (gateway). Nothing critical to correct invocation or interpretation is missing.

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 already 100%, so the baseline is 3. The description adds value beyond the schema with the 'not both' rule, the costing consequence example (walk as auto snaps to carriageway), and the polyline6 format clarification. It reinforces rather than merely restates 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 opens with a specific verb and resource: 'Snap a recorded GPS trace to the road network' and states it reports what was travelled over. It also frames the tool's purpose for dashcam/telematics logs, which distinguishes it from route-planning siblings like `route`.

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?

It clearly identifies the target use case ('turn a dashcam or telematics log into a report') and explains input constraints (shape OR encoded_polyline, costing must match travel mode). It does not explicitly name alternatives or state when not to use it, but the recorded-trace framing is enough to route an agent appropriately.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation4/5

Most tools target a distinct action and resource pair, and descriptions are explicit about which tool fits which scenario. The closest overlaps—plan_ev_route vs cheapest_charging_along_route, and route vs plan_day vs order_stops vs optimise_routes—are mitigated by clear guidance, so an agent can usually pick correctly.

Naming Consistency4/5

Tool names overwhelmingly follow a verb_noun snake_case pattern (plan_ev_route, set_palette, list_style_layers) with a consistent geo_ prefix for geometry helpers. Minor deviations like elevation, route, and matrix are short and readable but break the strict verb_noun convention.

Tool Count2/5

At 39 tools, this surface is well past the 25+ threshold and feels heavy even for a broad mapping platform. The set spans routing, geocoding, places, styles, EV/fuel, telematics, usage, and feedback, which would be easier for an agent to navigate if split into smaller domain-focused servers.

Completeness4/5

For the stated breadth, coverage is strong: routing, multi-stop planning, VRP, EV/fuel detours, geocoding, places, geometry, style lifecycle, and telematics all have workable primary paths. Minor gaps like no style deletion, no route alternatives, and no batch geocoding are present but do not create dead ends for core workflows.

Resources