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, ordered from most recommended to least recommended. Only one route is returned unless `ComputeRoutesRequest.compute_alternative_routes` is set to true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / routes / description
      Previous value: -"Contains routes between the requested origin and destination. Currently only one route is returned."New value: +"Contains routes between the requested origin and destination, ordered from most recommended to least recommended. Only one route is returned unless `ComputeRoutesRequest.compute_alternative_routes` is set to true."
  2. 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."
  3. 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."
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and non-idempotency, so the safety profile is covered. The description adds genuinely useful context beyond them: the WALK mode is in beta and the warning must be surfaced to the user, and grounded output must carry `attribution`. It does not address latency, quota, or failure behavior, so it stops short of a 5.

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?

The purpose and modes are front-loaded before the detail blocks, and the example call is high-value. It is somewhat long and repeats schema information (mode list, input types) in prose, which costs it a point.

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?

An output schema exists, so return values need not be explained, and the description covers the remaining gaps: required inputs, accepted input encodings, mode defaults, the clarification precondition, and the attribution obligation. Nothing needed to call it correctly is missing.

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 coverage is 100%, so the baseline is 3 – the Waypoint refs, enum values, and lat/lng ranges are all documented in the schema. The description still earns credit by clarifying that any combination of input types is allowed and that more granular addresses yield better results, plus giving a concrete example call.

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 opening sentence gives a specific verb and resource ('Computes a travel route between a specified origin and destination') and immediately scopes it with the supported travel modes. It also cross-references the sibling tool search_places as the source of place_id values, so an agent can place it relative to its neighbors without opening a schema.

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?

It states the input requirement (both origin and destination, any mix of address/lat_lng/place_id) and gives an explicit behavioral rule: 'If either the origin or destination is missing, you MUST ask the user for clarification before attempting to call the tool.' It also points to search_places as the alternative for obtaining place_id values.

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