get_directions
Calculate step-by-step directions between two locations using the Multi-MCPs server, integrating multiple third-party APIs to provide accurate and unified navigation results.
Instructions
Get directions between origin and destination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destination | Yes | ||
| origin | Yes |
Implementation Reference
- src/apis/maps/google.ts:80-86 (handler)The handler function that processes the tool call for get_directions, validates inputs, and delegates to the GoogleMapsClient.async get_directions(args: Record<string, unknown>) { if (!cfg.googleApiKey) throw new Error("GOOGLE_API_KEY is not configured"); const origin = String(args.origin || ""); const destination = String(args.destination || ""); if (!origin || !destination) throw new Error("origin and destination are required"); return client.getDirections(origin, destination); },
- src/apis/maps/google.ts:51-58 (schema)Input schema defining the required origin and destination string parameters for the get_directions tool.inputSchema: { type: "object", properties: { origin: { type: "string" }, destination: { type: "string" }, }, required: ["origin", "destination"], },
- src/apis/maps/google.ts:48-59 (registration)Tool registration entry in the registerGoogleMaps function, including name, description, and input schema.{ name: "get_directions", description: "Get directions between origin and destination", inputSchema: { type: "object", properties: { origin: { type: "string" }, destination: { type: "string" }, }, required: ["origin", "destination"], }, },
- src/apis/maps/google.ts:18-22 (helper)GoogleMapsClient helper method that performs the actual Google Directions API request.getDirections(origin: string, destination: string) { return this.request("/maps/api/directions/json", { query: { origin, destination, key: this.apiKey }, }); }