Skip to main content
Glama

Google Maps MCP

Get Google Maps Directions (SerpAPI)

google_maps_directions

Get directions between two points via SerpAPI. Provide a start point (one of start_addr, start_coords 'lat,lon', or start_data_id) and an end point (one of end_addr, end_coords, or end_data_id) — the data_ids come from google_maps_search results. Returns the route(s) with distance, duration and step-by-step legs. Shape the route with travel_mode (driving/transit/walking/…), avoid, and time. Result shape: { source, fetchedAt, query, search_metadata, search_parameters, places_info: [{ address, data_id, gps_coordinates }], durations: [{ travel_mode, duration, formatted_duration }], directions: [...] } — the list key is directions. Each direction: { travel_mode, via, distance (meters), duration (seconds), formatted_distance, formatted_duration, typical_duration_range, extensions, trips: [{ travel_mode, title, distance, duration, formatted_distance, formatted_duration, details: [{ title, action, distance, duration }] }] } plus, for transit, start_time, end_time, arrive_around, cost, currency; a Flight entry has only { travel_mode, icon, flight }.

Input Schema

NameRequiredDescriptionDefault
glNoCountry code, e.g. 'us', 'uk', 'de'.
hlNoLanguage code, e.g. 'en', 'es', 'fr'.
timeNoDeparture/arrival time: 'depart_at:<unix>', 'arrive_by:<unix>', or 'last_available' (transit only).
avoidNoComma-separated route features to avoid: 'highways', 'tolls', 'ferries'.
routeNoTransit route option (travel_mode=3 only): 2=Fewer transfers, 3=Less walking, 4=Wheelchair accessible.
preferNoComma-separated transit preferences (travel_mode=3 only): 'bus', 'subway', 'train', 'tram_light_rail'.
end_addrNoEnding address, e.g. 'Dallas, TX'. Provide one of end_addr/end_coords/end_data_id.
no_cacheNoForce a fresh SerpAPI fetch and bypass this server's result cache. Default false.
end_coordsNoEnding GPS coordinates as 'lat,lon'.
start_addrNoStarting address, e.g. 'Austin, TX'. Provide one of start_addr/start_coords/start_data_id.
zero_traceNoEnterprise-only ZeroTrace mode: don't store search params/metadata on SerpAPI. Default false.
end_data_idNoPlace data id of the ending point (from a google_maps_search result).
travel_modeNoTravel mode: 6=Best (default), 0=Driving, 1=Cycling, 2=Walking, 3=Transit, 4=Flight, 9=Two-wheeler.
start_coordsNoStarting GPS coordinates as 'lat,lon', e.g. '30.1974,-97.6663'.
distance_unitNoDistance unit: 0=km, 1=miles.
start_data_idNoPlace data id of the starting point (from a google_maps_search result).

Output Schema

NameRequiredDescriptionDefault
queryYes
sourceYes
durationsNo
fetchedAtYes
directionsNo
places_infoNo
search_metadataNo
search_parametersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden; it does disclose that results come from a SerpAPI fetch and are returned as a list under `directions`. However it says nothing about caching behavior (no_cache), rate limits, error modes, or whether calls are billable/side-effect free — the very traits an agent needs for a read-through-SerpAPI tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and endpoint rules are correctly front-loaded, but roughly half the text is a deep enumeration of the return payload (nested trips, details, transit cost fields) that duplicates the existing output schema. Those sentences do not earn their place and bury the actionable parameter guidance.

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?

For a 16-parameter, annotation-free read tool, the description covers the essential call contract (how to specify endpoints, how to shape the route) and an output schema covers returns. Gaps remain around caching semantics and failure behavior, but nothing that would cause a mis-invocation 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, but the description adds real value beyond the schema: it states the mutually-exclusive one-of constraint for start and end points, which the schema does not enforce (zero required fields, no top-level oneOf). It also groups travel_mode/avoid/time as the route-shaping controls.

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?

States a specific verb and resource ("Get directions between two points via SerpAPI") and immediately distinguishes itself from google_maps_search by naming it as the source of data_ids. An agent can tell this apart from google_maps_search, google_maps_reviews, and google_local_search without opening any schema.

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?

Gives concrete usage context: one endpoint must come from start_addr/start_coords/start_data_id, the other from end_addr/end_coords/end_data_id, and route shaping is done via travel_mode, avoid, and time. It does not state when-not to use it or contrast with sibling tools beyond sourcing data_ids, so it stops short of full alternatives guidance.

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