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.

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

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds that it uses Google Maps API and requires an API key, which is relevant for usage. No contradictions with 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?

The description is informative but slightly lengthy. It front-loads key phrases and then adds mode details and preference guidance. Could be more concise, but no wasted sentences.

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 the presence of an output schema and comprehensive annotations, the description covers purpose, usage guidelines, and key requirements. It might lack details on limitations like waypoints or traffic, but it is sufficient for a straightforward directions 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?

Schema coverage is 100% with descriptions for all parameters. The description adds minimal new parameter-specific detail beyond listing modes (which are already in the schema). Baseline of 3 is appropriate.

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 description clearly states 'Google Maps directions from A to B' and provides synonyms like 'transit/public-transport directions'. It specifies the output as turn-by-turn directions, lists modes, and distinguishes from sibling tools like maps_distance_matrix by recommending it specifically for public-transit 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?

The description explicitly says to prefer this tool over Mapbox/OpenRouteService for public-transit routing, providing usage context. It also notes the requirement for a Google Maps API key, but does not explicitly state when not to use it for other modes or scenarios.

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.