Skip to main content
Glama

Maps Compute Route Matrix

maps_compute_route_matrix
Read-onlyIdempotent

Computes travel duration and distance for every origin–destination pair (up to 25) by driving, walking, or cycling, returning matrix elements for route planning and comparisons.

Instructions

Duration and distance for every origin x destination pair, at most 25 pairs; each pair is one Google request (Routes API computeRouteMatrix element shape): {travelMode, elements: [{originIndex, destinationIndex, status, condition, distanceMeters, duration, staticDuration, localizedValues}]}. Identical origin and destination cost nothing.

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": {
      "origins": "<origins>",
      "destinations": "<destinations>"
    },
    "name": "maps_compute_route_matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
originsYes
travelModeNoDRIVE (default), WALK or BICYCLEDRIVE
destinationsYes
departureTimeNoLocal wall-clock time at the stop, e.g. 2026-10-22T08:30 (no offset)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered; the description adds real operational context beyond them by stating that each pair counts as one Google request and that identical origin=destination pairs cost nothing. It stops short of stating quota/rate limits or error behavior for failed elements.

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

Conciseness4/5

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

Front-loaded with the purpose and limit in the first clause, then the element shape. The inline response-shape dump is dense but informative rather than filler; no redundant sentences.

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?

With an output schema present, return values need not be explained, yet the description still sketches the element shape and the cost-per-pair model, which is the main thing an agent would otherwise get wrong. Only the absence of sibling routing guidance keeps it from full marks.

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 50%, with origins/destinations/travelMode/departureTime all carrying their own descriptions, so the schema does most of the work. The description only reinforces the 25-pair cap already encoded as maxItems and the response element keys; it adds little parameter-level meaning.

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?

States a specific resource and output ('duration and distance for every origin x destination pair') plus a scope bound (at most 25 pairs), which cleanly separates it from the single-route siblings maps_compute_route and maps_plan_route.

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

Usage Guidelines3/5

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

The all-pairs scope implies when it is appropriate, but there is no explicit when-to-use or when-not guidance and no sibling is named, even though maps_compute_route and maps_plan_route are obvious alternatives an agent must choose between.

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