Skip to main content
Glama

route_matrix

Read-onlyIdempotent

Compute road travel times and distances for multiple origins and destinations in one call, identifying the nearest destination for each origin.

Instructions

Get road travel times and distances between many origins and destinations at once.

One call answers "which depot is closest by road to each customer", "which crew can reach each job fastest", or ranks candidate sites by access. Returns a duration and distance for every origin-destination pair, indexed [origin][destination], plus the nearest destination for each origin. Unreachable pairs are null.

For turn-by-turn directions on one trip, use route_directions. For everywhere reachable within a time budget, use route_isochrone. For straight-line distance, use geom_measure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originsYesStart points, semicolon-separated, as coordinates or place names. Example: '48.8584,2.2945; 48.8606,2.3376'
profileNoVehicle type.car
destinationsNoEnd points in the same form. Leave empty to measure every origin against every other origin.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
nearestYes
originsYes
profileYes
duration_sYes
distance_kmYes
destinationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds substantial behavioral detail beyond annotations: every origin-destination pair is returned, results are indexed [origin][destination], the nearest destination per origin is included, and unreachable pairs are null. This gives the agent a clear model of the operation's output behavior.

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 well-structured and front-loaded: first sentence states the core function, second gives representative use cases, third explains return shape, and the final sentence routes to alternatives. Every sentence earns its place without redundancy.

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?

Given the output schema exists and annotations are rich, the description is complete for an agent to select and invoke the tool. It covers the matrix semantics, null behavior, and sibling differentiation. No critical missing context is apparent.

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 description coverage is 100%, so the schema already documents origins, profile, and destinations with examples and defaults. The description reinforces the multi-origin/destination nature but does not add significant new parameter-level semantics. Baseline 3 is appropriate because the schema carries the burden.

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: 'Get road travel times and distances between many origins and destinations at once.' It immediately conveys the batch origin-destination calculation and distinguishes itself from route_directions, route_isochrone, and geom_measure through concrete use cases. This is clearly differentiated from sibling tools.

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

Usage Guidelines5/5

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

The description provides explicit routing guidance: use route_directions for turn-by-turn directions, route_isochrone for time-budget reachability, and geom_measure for straight-line distance. It also gives example analytical questions the tool answers, such as which depot is closest by road. This is exemplary when-to-use versus when-not-to-use guidance.

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