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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / Route / description
      Previous value: -"Details about a route between two locations."New value: +"Details about a route between locations."
  2. Changed2 schema fields changed
    • addedOutput schema / $defs / Attribution
      Added value: +{
      +  "description": "Required attribution to show with maps content.",
      +  "properties": {
      +    "title": {
      +      "description": "The title to display for the attribution.",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "The URL to link to for the attribution.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / $defs / Route / properties / attribution
      Added value: +{
      +  "$ref": "#/$defs/Attribution",
      +  "description": "Required attribution to show with the route."
      +}
  3. First observed

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.

Resources