maps_directions

Pack: google_maps · Endpoint: https://gateway.pipeworx.io/google_maps/mcp

Get turn-by-turn directions between locations. Returns route, distance, duration, and waypoints. Specify mode: driving, walking, transit, or biking.

Parameters

NameTypeRequiredDescription
originstringyesStarting point (address or “lat,lng”)
destinationstringyesEnd point (address or “lat,lng”)
modestringnoTravel mode: driving, walking, bicycling, transit (default: driving)
_apiKeystringyesGoogle Maps API key

Example call

Arguments

{
  "origin": "New York, NY",
  "destination": "Boston, MA",
  "_apiKey": "your-google_maps-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/google_maps/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"maps_directions","arguments":{"origin":"New York, NY","destination":"Boston, MA","_apiKey":"your-google_maps-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('maps_directions', {
  "origin": "New York, NY",
  "destination": "Boston, MA",
  "_apiKey": "your-google_maps-api-key"
});

More examples

{
  "origin": "40.7128,-74.0060",
  "destination": "40.7614,-73.9776",
  "mode": "walking",
  "_apiKey": "your-google_maps-api-key"
}

Response shape

FieldTypeDescription
routesarrayArray of possible routes
statusstringStatus of the directions request
Full JSON Schema
{
  "type": "object",
  "properties": {
    "routes": {
      "type": "array",
      "description": "Array of possible routes",
      "items": {
        "type": "object",
        "properties": {
          "summary": {
            "type": "string",
            "description": "Route summary"
          },
          "legs": {
            "type": "array",
            "description": "Route segments between waypoints",
            "items": {
              "type": "object",
              "properties": {
                "distance": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "Human-readable distance"
                    },
                    "value": {
                      "type": "number",
                      "description": "Distance in meters"
                    }
                  }
                },
                "duration": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "Human-readable duration"
                    },
                    "value": {
                      "type": "number",
                      "description": "Duration in seconds"
                    }
                  }
                },
                "start_location": {
                  "type": "object",
                  "properties": {
                    "lat": {
                      "type": "number",
                      "description": "Latitude"
                    },
                    "lng": {
                      "type": "number",
                      "description": "Longitude"
                    }
                  }
                },
                "end_location": {
                  "type": "object",
                  "properties": {
                    "lat": {
                      "type": "number",
                      "description": "Latitude"
                    },
                    "lng": {
                      "type": "number",
                      "description": "Longitude"
                    }
                  }
                },
                "steps": {
                  "type": "array",
                  "description": "Turn-by-turn directions",
                  "items": {
                    "type": "object",
                    "properties": {
                      "distance": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Human-readable distance"
                          },
                          "value": {
                            "type": "number",
                            "description": "Distance in meters"
                          }
                        }
                      },
                      "duration": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "description": "Human-readable duration"
                          },
                          "value": {
                            "type": "number",
                            "description": "Duration in seconds"
                          }
                        }
                      },
                      "html_instructions": {
                        "type": "string",
                        "description": "Turn-by-turn instruction text"
                      },
                      "start_location": {
                        "type": "object",
                        "properties": {
                          "lat": {
                            "type": "number",
                            "description": "Latitude"
                          },
                          "lng": {
                            "type": "number",
                            "description": "Longitude"
                          }
                        }
                      },
                      "end_location": {
                        "type": "object",
                        "properties": {
                          "lat": {
                            "type": "number",
                            "description": "Latitude"
                          },
                          "lng": {
                            "type": "number",
                            "description": "Longitude"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "bounds": {
            "type": "object",
            "description": "Route bounding box"
          },
          "copyrights": {
            "type": "string",
            "description": "Attribution/copyright notice"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Route warnings if any"
          }
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "OK",
        "NOT_FOUND",
        "ZERO_RESULTS",
        "MAX_WAYPOINTS_EXCEEDED",
        "MAX_ROUTE_LENGTH_EXCEEDED",
        "INVALID_REQUEST",
        "OVER_QUERY_LIMIT",
        "REQUEST_DENIED",
        "UNKNOWN_ERROR"
      ],
      "description": "Status of the directions request"
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "google_maps": {
      "url": "https://gateway.pipeworx.io/google_maps/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026