Skip to main content
Glama

Directions / routes

directions
Read-onlyIdempotent

Compute a route from origin to destination by DRIVE, WALK, BICYCLE, TRANSIT, or TWO_WHEELER. Use when the user asks how to get somewhere, how far it is, or how long it takes. Origin and destination may be an address string, "lat,lng", or an object with place_id. Returns total duration and distance, an encoded polyline, and per-leg turn-by-turn steps (maneuver, instruction text, distance, duration, start/end lat/lng).

Input Schema

NameRequiredDescriptionDefault
originYesAddress string, 'lat,lng', or {address|place_id|latitude,longitude}
field_maskNoOptional Routes X-Goog-FieldMask override. Default includes turn-by-turn navigationInstruction without Pro fields (localizedValues, travelAdvisory).
destinationYesAddress string, 'lat,lng', or {address|place_id|latitude,longitude}
travel_modeNoDRIVE, WALK, BICYCLE, TRANSIT, TWO_WHEELER
alternativesNo
intermediatesNo
language_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, open-world read, so the description need not restate safety. It adds value by describing the return payload (total duration/distance, encoded polyline, per-leg turn-by-turn steps) and the accepted origin/destination input formats, which is real behavioral context beyond the structured fields.

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?

Three tight sentences with no filler: capability first, activation conditions second, return shape last. Densely packed but each sentence carries distinct information.

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?

With no output schema, the description appropriately explains the response shape, and it covers routing intent and input formats. It leaves the semantics of alternatives, intermediates, and language_code unexplained, a minor gap for a 7-param tool.

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?

At 57% schema coverage the description meaningfully supplements the two required params, spelling out that origin/destination accept an address string, 'lat,lng', or a place_id object, and listing the travel_mode values. It says nothing about alternatives, intermediates, language_code, or field_mask, leaving those to the schema.

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?

Names a precise verb+resource (compute a route from origin to destination) and enumerates the five supported travel modes. The purpose is unmistakable next to the sibling tools geocode and places_*, which handle geocoding and place lookup rather than routing.

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 the triggering intents: 'how to get somewhere, how far it is, or how long it takes.' That is a clear when-to-use, though it names no explicit exclusions or alternatives among the siblings.

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