Skip to main content
Glama

routes_matrix

Computes distance and travel time matrices between multiple origins and destinations for route planning and logistics optimization.

Instructions

Compute distance matrix between multiple origins and destinations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitsNoUnit system for distances
regionNoRegion code for biasing results (ISO 3166-1 alpha-2, e.g., "US", "GB", "DE")
originsYesArray of starting locations for distance calculations. Each location should be either coordinates like {"lat": 37.7749, "lng": -122.4194} or an address like {"address": "San Francisco, CA"}
languageNoLanguage code for results (ISO 639-1, e.g., "en", "es", "fr")
travel_modeNoTransportation mode for distance calculations
destinationsYesArray of destination locations for distance calculations. Each location should be either coordinates like {"lat": 40.7128, "lng": -74.0060} or an address like {"address": "New York, NY"}
routing_preferenceNoRouting algorithm preference
Behavior2/5

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

No annotations are provided, and the description does not disclose any behavioral traits such as rate limits, data limitations (e.g., maximum matrix size), or side effects. The description is purely functional.

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 a single, concise sentence with no wasted words. It is appropriately sized for a simple tool with well-documented parameters.

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

Completeness2/5

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

Despite high schema coverage, the description lacks context for the output format (no output schema) and does not differentiate from similar tools. The agent may not know what the tool returns or how it behaves.

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 input schema already describes all parameters well. The tool description adds no additional meaning beyond what the schema provides. Baseline is 3.

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 'Compute distance matrix between multiple origins and destinations', which is a specific verb+resource. This distinguishes it from sibling tools like 'routes_compute' (likely single route) and 'nearby_find'.

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?

No usage guidelines provided. The description does not indicate when to use this tool versus alternatives, nor does it mention prerequisites or context. The agent must infer from the name and sibling list.

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/david-pivonka/google-maps-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server