Skip to main content
Glama

Maps Compute Route

maps_compute_route
Read-onlyIdempotent

Calculate route travel time and distance for driving, walking, or cycling, with up to 8 stops and optional turn-by-turn steps or alternatives.

Instructions

Travel time and distance through the stops in order (Routes API computeRoutes shape): {travelMode, routes: [{description, distanceMeters, duration, staticDuration, localizedValues, durationWithoutTraffic, durationRange, departureTime, arrivalTime, legs: [{distanceMeters, duration, staticDuration, startLocation, endLocation, localizedValues}]}], waypoints: [{query, displayName, formattedAddress, placeId, location}], googleMapsUri, condition, note}. duration is in traffic for DRIVE (now or at departureTime/arrivalTime), otherwise typical. includeSteps fills legs[].steps [{distanceMeters, staticDuration, startLocation, navigationInstruction {maneuver, instructions}, localizedValues, notices}] and legs[].segments [{instructions, distanceMeters, staticDuration, firstStepIndex, stepCount}]; includePolyline fills routes[].polyline {encodedPolyline}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origin": "<origin>",
      "destination": "<destination>"
    },
    "name": "maps_compute_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
originYesA place name or address ('Albertina, Vienna'), a place id (ChIJ…) or 'lat,lng'
travelModeNoDRIVE (default), WALK or BICYCLEDRIVE
arrivalTimeNoLocal wall-clock time at the stop, e.g. 2026-10-22T08:30 (no offset)
destinationYesA place name or address ('Albertina, Vienna'), a place id (ChIJ…) or 'lat,lng'
includeStepsNoAdd turn-by-turn steps and segments per leg
departureTimeNoLocal wall-clock time at the stop, e.g. 2026-10-22T08:30 (no offset)
intermediatesNoStops in between, in order (max 8)
includePolylineNoAdd the route line (encoded polyline)
computeAlternativeRoutesNoAlso return alternatives (max 3)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond that: 'duration is in traffic for DRIVE (now or at departureTime/arrivalTime), otherwise typical' explains what the returned numbers mean. It says nothing about failure modes (unresolvable origin, no route found), quota/rate limits, or the interaction between departureTime and arrivalTime when both are supplied.

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

Conciseness3/5

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

The purpose is front-loaded in the first clause, which is good, but the bulk of the text is a long nested enumeration of the response shape that an output schema already defines. It reads as a dense run-on where the actionable guidance (includeSteps/includePolyline/traffic semantics) is buried mid-paragraph rather than surfaced.

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

Completeness3/5

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

An output schema exists, so the extensive return-shape recital is largely redundant, while the genuinely missing context - how this differs from plan_route/show_route, whether departureTime and arrivalTime are mutually exclusive, what happens when no route is found - is absent. The definition is complete on data shape but incomplete on decision-making.

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%, so baseline is 3, but the description earns more by explaining parameter effects on the response: includeSteps fills legs[].steps and legs[].segments, includePolyline fills routes[].polyline, and travelMode changes whether duration includes traffic. That is meaning the schema does not carry.

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 opening clause 'Travel time and distance through the stops in order' gives a specific verb-plus-resource, and the mention of ordered stops plus the Routes API shape makes the scope concrete. It never distinguishes itself from siblings like maps_plan_route, maps_show_route, or maps_compute_route_matrix, so an agent cannot tell from the description alone which route tool to pick.

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?

There is no when-to-use statement, no exclusion, and no mention of any sibling alternative. Given that the sibling set contains three other route-related tools (plan_route, show_route, compute_route_matrix), this omission is a real gap rather than a minor one.

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