Skip to main content
Glama

Maps Directions

maps_directions
Read-onlyIdempotent

"Google Maps directions from A to B" / "transit / public-transport directions" / "bus / subway / train route" / "best way to get from [X] to [Y]", turn-by-turn directions via Google Maps. Modes: driving, walking, transit (bus/subway/train), bicycling. Requires Google Maps API key. PREFER over Mapbox/OpenRouteService specifically for public-transit routing, Google has the best transit data.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origin": "New York, NY",
      "_apiKey": "your-google_maps-api-key",
      "destination": "Boston, MA"
    },
    "name": "maps_directions"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoTravel mode: driving, walking, bicycling, transit (default: driving)
originYesStarting point (address or "lat,lng")
_apiKeyYesGoogle Maps API key
destinationYesEnd point (address or "lat,lng")

Output Schema

NameRequiredDescriptionDefault
routesNoArray of possible routes
statusNoStatus of the directions request

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "routes": {
      +      "description": "Array of possible routes",
      +      "items": {
      +        "properties": {
      +          "bounds": {
      +            "description": "Route bounding box",
      +            "type": "object"
      +          },
      +          "copyrights": {
      +            "description": "Attribution/copyright notice",
      +            "type": "string"
      +          },
      +          "legs": {
      +            "description": "Route segments between waypoints",
      +            "items": {
      +              "properties": {
      +                "distance": {
      +                  "properties": {
      +                    "text": {
      +                      "description": "Human-readable distance",
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "description": "Distance in meters",
      +                      "type": "number"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "duration": {
      +                  "properties": {
      +                    "text": {
      +                      "description": "Human-readable duration",
      +                      "type": "string"
      +                    },
      +                    "value": {
      +                      "description": "Duration in seconds",
      +                      "type": "number"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "end_location": {
      +                  "properties": {
      +                    "lat": {
      +                      "description": "Latitude",
      +                      "type": "number"
      +                    },
      +                    "lng": {
      +                      "description": "Longitude",
      +                      "type": "number"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "start_location": {
      +                  "properties": {
      +                    "lat": {
      +                      "description": "Latitude",
      +                      "type": "number"
      +                    },
      +                    "lng": {
      +                      "description": "Longitude",
      +                      "type": "number"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                "steps": {
      +                  "description": "Turn-by-turn directions",
      +                  "items": {
      +                    "properties": {
      +                      "distance": {
      +                        "properties": {
      +                          "text": {
      +                            "description": "Human-readable distance",
      +                            "type": "string"
      +                          },
      +                          "value": {
      +                            "description": "Distance in meters",
      +                            "type": "number"
      +                          }
      +                        },
      +                        "type": "object"
      +                      },
      +                      "duration": {
      +                        "properties": {
      +                          "text": {
      +                            "description": "Human-readable duration",
      +                            "type": "string"
      +                          },
      +                          "value": {
      +                            "description": "Duration in seconds",
      +                            "type": "number"
      +                          }
      +                        },
      +                        "type": "object"
      +                      },
      +                      "end_location": {
      +                        "properties": {
      +                          "lat": {
      +                            "description": "Latitude",
      +                            "type": "number"
      +                          },
      +                          "lng": {
      +                            "description": "Longitude",
      +                            "type": "number"
      +                          }
      +                        },
      +                        "type": "object"
      +                      },
      +                      "html_instructions": {
      +                        "description": "Turn-by-turn instruction text",
      +                        "type": "string"
      +                      },
      +                      "start_location": {
      +                        "properties": {
      +                          "lat": {
      +                            "description": "Latitude",
      +                            "type": "number"
      +                          },
      +                          "lng": {
      +                            "description": "Longitude",
      +                            "type": "number"
      +                          }
      +                        },
      +                        "type": "object"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "summary": {
      +            "description": "Route summary",
      +            "type": "string"
      +          },
      +          "warnings": {
      +            "description": "Route warnings if any",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Status of the directions request",
      +      "enum": [
      +        "OK",
      +        "NOT_FOUND",
      +        "ZERO_RESULTS",
      +        "MAX_WAYPOINTS_EXCEEDED",
      +        "MAX_ROUTE_LENGTH_EXCEEDED",
      +        "INVALID_REQUEST",
      +        "OVER_QUERY_LIMIT",
      +        "REQUEST_DENIED",
      +        "UNKNOWN_ERROR"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-google_maps-api-key",
      +    "destination": "Boston, MA",
      +    "origin": "New York, NY"
      +  },
      +  {
      +    "_apiKey": "your-google_maps-api-key",
      +    "destination": "40.7614,-73.9776",
      +    "mode": "walking",
      +    "origin": "40.7128,-74.0060"
      +  }
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds useful context beyond them — that a Google Maps API key is required and that transit coverage is the strength — though it says nothing about rate limits or quota behavior for an external-API call.

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 core purpose is front-loaded, but the leading string of quoted search-style phrases ('best way to get from [X] to [Y]', 'bus / subway / train route') is keyword padding that crowds out substantive guidance. The remaining sentences are efficient.

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 a full output schema, rich annotations, and complete parameter documentation, the description only needs to establish purpose, modes and the API-key requirement — all of which it does. The only gap is how this tool relates to the other Maps siblings.

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?

Schema description coverage is 100%, so the schema already documents origin, destination, mode and the API key. The mode list in the description (driving, walking, transit, bicycling) merely repeats what the schema's mode field already states, adding no syntax or format detail beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource — turn-by-turn directions via Google Maps, with the four supported travel modes enumerated. It stops short of differentiating from the nearest sibling, maps_distance_matrix, so an agent must infer that distinction from the tool names alone.

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?

It gives an explicit preference rule: use this over Mapbox/OpenRouteService specifically for public-transit routing because Google's transit data is better. That is real routing guidance, but there is no when-not guidance relative to sibling Maps tools (e.g. distance matrix vs. directions), leaving that choice to inference.

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.