Skip to main content
Glama
ClawyPro

Clawy MCP Server

by ClawyPro

google_maps_directions

Get directions between two locations using Google Maps. Supports driving, walking, bicycling, and transit modes for route planning.

Instructions

Get directions between two points via Google Maps. Supports driving, walking, bicycling, and transit modes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYesStarting point (address or lat,lng)
destinationYesDestination (address or lat,lng)
modeNoTravel mode (default: driving)
languageNoLanguage for instructions

Implementation Reference

  • The tool definition for `google_maps_directions`, specifying its input schema and API endpoint.
      name: "google_maps_directions",
      description: "Get directions between two points via Google Maps. Supports driving, walking, bicycling, and transit modes.",
      inputSchema: z.object({
        origin: z.string().describe("Starting point (address or lat,lng)"),
        destination: z.string().describe("Destination (address or lat,lng)"),
        mode: z.enum(["driving", "walking", "bicycling", "transit"]).optional()
          .describe("Travel mode (default: driving)"),
        language: z.string().optional().describe("Language for instructions"),
      }),
      endpoint: "/v1/google-maps/directions",
    },
  • The generic handler registration that maps all tools (including `google_maps_directions`) to a gateway request.
    for (const tool of allTools) {
      server.tool(
        tool.name,
        tool.description,
        tool.inputSchema.shape,
        async (params) => {
          const method = tool.method || "POST";
          const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>);
    
          if (result.error) {
            return {
              content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }],
              isError: true,
            };
          }
    
          const text = typeof result.data === "string"
            ? result.data
            : JSON.stringify(result.data, null, 2);
    
          return {
            content: [{ type: "text" as const, text }],
          };
        },
      );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ClawyPro/clawy-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server