Skip to main content
Glama

compute_routes

Read-only

Computes a travel route between a specified origin and destination. Supported Travel Modes: DRIVE (default), WALK.

Input Requirements (CRITICAL): Requires both origin and destination. Each must be provided using one of the following methods, nested within its respective field:

  • address: (string, e.g., 'Eiffel Tower, Paris'). Note: The more granular or specific the input address is, the better the results will be.

  • lat_lng: (object, {"latitude": number, "longitude": number})

  • place_id: (string, e.g., 'ChIJOwE_Id1w5EAR4Q27FkL6T_0') Note: This id can be obtained from the search_places tool. Any combination of input types is allowed (e.g., origin by address, destination by lat_lng). If either the origin or destination is missing, you MUST ask the user for clarification before attempting to call the tool.

Example Tool Call: {"origin":{"address":"Eiffel Tower"},"destination":{"place_id":"ChIJt_5xIthw5EARoJ71mGq7t74"},"travel_mode":"DRIVE"}

  • The grounded output must be attributed to the source using the information from the attribution field when available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYesRequired. Origin waypoint.
travelModeNoOptional. Specifies the mode of transportation.
destinationYesRequired. Destination waypoint.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
routesNoContains routes between the requested origin and destination. Currently only one route is returned.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the description does not need to repeat that. It adds behavioral guidance: requiring user clarification for missing inputs and instructing that grounded output must be attributed via the attribution field, which is beyond the schema and annotations.

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?

Well-structured with clear sections and bullet points. The critical requirement (both origin and destination) is front-loaded. Each part contributes useful information, though the description is somewhat long.

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?

Given that there is an output schema and read-only annotations, the description adequately covers inputs, travel modes, example call, and attribution. It does not mention error handling, but that is not essential for calling the tool correctly.

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 covers all three parameters, but the description adds meaning by explaining the three ways to specify waypoints (address, lat_lng, place_id), noting that any combination is allowed, and giving a concrete example. This goes beyond the schema's field descriptions.

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?

Clearly states the tool computes a travel route between an origin and destination. The verb 'computes' and resource 'travel route' distinguish it from sibling tools like search_places or lookup_weather.

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?

Explicitly states that both origin and destination are required and instructs to ask the user for clarification if either is missing. Mentions that place_id can be obtained from search_places, providing a pointer to a sibling tool. However, it does not explicitly contrast this tool with alternatives for routing.

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/5.0
Disambiguation5/5

Each tool has a distinctly different purpose: compute_routes for travel directions, lookup_weather for meteorological data, search_places for free-text place discovery, and resolve_maps_urls/resolve_names for batch converting specific inputs (URLs or exact names) into canonical place IDs. There is no overlap in function that would cause an agent to select the wrong tool.

Naming Consistency4/5

All tools follow a verb_noun snake_case pattern (compute_routes, lookup_weather, search_places, resolve_names, resolve_maps_urls). The use of 'resolve' for two tools is slightly redundant but each targets a distinct input type (names vs. URLs), so the pattern remains predictable and clear.

Tool Count5/5

With five tools, the server is well-scoped for a Google Maps integration. It covers the essential capabilities (routing, weather, place search, and ID resolution) without unnecessary bloat, falling comfortably within the ideal 3-15 tool range.

Completeness4/5

The tool surface covers core map-related tasks: route calculation, weather, place searching, and canonical place ID resolution from both URLs and named locations. A potential gap is lack of a dedicated reverse geocoding tool (lat/lng → address), but lookup_weather's geocoded output partially covers this, and search_places can handle address-like queries. Overall, the domain is well covered with only minor omissions.

Resources