@cablate/mcp-google-map 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  # Google Maps Tools - Parameter & Response Reference
2
2
 
3
- ## geocode
3
+ ## maps_geocode
4
4
 
5
5
  Convert an address or landmark name to GPS coordinates.
6
6
 
7
7
  ```bash
8
- exec geocode '{"address": "Tokyo Tower"}'
8
+ exec maps_geocode '{"address": "Tokyo Tower"}'
9
9
  ```
10
10
 
11
11
  | Param | Type | Required | Description |
@@ -26,12 +26,12 @@ Response:
26
26
 
27
27
  ---
28
28
 
29
- ## batch-geocode
29
+ ## maps_batch_geocode
30
30
 
31
31
  Geocode multiple addresses in one call (max 50).
32
32
 
33
33
  ```bash
34
- exec batch-geocode-tool '{"addresses": ["Tokyo Tower", "Eiffel Tower", "Statue of Liberty"]}'
34
+ exec maps_batch_geocode '{"addresses": ["Tokyo Tower", "Eiffel Tower", "Statue of Liberty"]}'
35
35
  ```
36
36
 
37
37
  | Param | Type | Required | Description |
@@ -53,12 +53,12 @@ Response:
53
53
 
54
54
  ---
55
55
 
56
- ## reverse-geocode
56
+ ## maps_reverse_geocode
57
57
 
58
58
  Convert GPS coordinates to a street address.
59
59
 
60
60
  ```bash
61
- exec reverse-geocode '{"latitude": 35.6586, "longitude": 139.7454}'
61
+ exec maps_reverse_geocode '{"latitude": 35.6586, "longitude": 139.7454}'
62
62
  ```
63
63
 
64
64
  | Param | Type | Required | Description |
@@ -80,12 +80,12 @@ Response:
80
80
 
81
81
  ---
82
82
 
83
- ## search-nearby
83
+ ## maps_search_nearby
84
84
 
85
85
  Find places near a location by type.
86
86
 
87
87
  ```bash
88
- exec search-nearby '{"center": {"value": "35.6586,139.7454", "isCoordinates": true}, "keyword": "restaurant", "radius": 500}'
88
+ exec maps_search_nearby '{"center": {"value": "35.6586,139.7454", "isCoordinates": true}, "keyword": "restaurant", "radius": 500}'
89
89
  ```
90
90
 
91
91
  | Param | Type | Required | Description |
@@ -100,12 +100,12 @@ Response: `{ success, location, data: [{ name, place_id, formatted_address, geom
100
100
 
101
101
  ---
102
102
 
103
- ## search-places
103
+ ## maps_search_places
104
104
 
105
- Free-text place search. More flexible than search-nearby.
105
+ Free-text place search. More flexible than maps_search_nearby.
106
106
 
107
107
  ```bash
108
- exec search-places '{"query": "ramen in Tokyo"}'
108
+ exec maps_search_places '{"query": "ramen in Tokyo"}'
109
109
  ```
110
110
 
111
111
  | Param | Type | Required | Description |
@@ -120,12 +120,12 @@ Response: `{ success, data: [{ name, place_id, address, location, rating, total_
120
120
 
121
121
  ---
122
122
 
123
- ## place-details
123
+ ## maps_place_details
124
124
 
125
125
  Get full details for a place by its place_id (from search results). Returns reviews, phone, website, hours, photos.
126
126
 
127
127
  ```bash
128
- exec place-details '{"placeId": "ChIJCewJkL2LGGAR3Qmk0vCTGkg"}'
128
+ exec maps_place_details '{"placeId": "ChIJCewJkL2LGGAR3Qmk0vCTGkg"}'
129
129
  ```
130
130
 
131
131
  | Param | Type | Required | Description |
@@ -134,12 +134,12 @@ exec place-details '{"placeId": "ChIJCewJkL2LGGAR3Qmk0vCTGkg"}'
134
134
 
135
135
  ---
136
136
 
137
- ## directions
137
+ ## maps_directions
138
138
 
139
139
  Get step-by-step navigation between two points.
140
140
 
141
141
  ```bash
142
- exec directions '{"origin": "Tokyo Tower", "destination": "Shibuya Station", "mode": "transit"}'
142
+ exec maps_directions '{"origin": "Tokyo Tower", "destination": "Shibuya Station", "mode": "transit"}'
143
143
  ```
144
144
 
145
145
  | Param | Type | Required | Description |
@@ -152,12 +152,14 @@ exec directions '{"origin": "Tokyo Tower", "destination": "Shibuya Station", "mo
152
152
 
153
153
  ---
154
154
 
155
- ## distance-matrix
155
+ ## maps_distance_matrix
156
156
 
157
157
  Calculate travel distances and times between multiple origins and destinations.
158
158
 
159
+ > **Known limitation:** Transit mode returns null in some regions (notably Japan). Fall back to `driving` or `walking` mode if transit returns no results.
160
+
159
161
  ```bash
160
- exec distance-matrix '{"origins": ["Tokyo Tower"], "destinations": ["Shibuya Station", "Shinjuku Station"], "mode": "driving"}'
162
+ exec maps_distance_matrix '{"origins": ["Tokyo Tower"], "destinations": ["Shibuya Station", "Shinjuku Station"], "mode": "driving"}'
161
163
  ```
162
164
 
163
165
  | Param | Type | Required | Description |
@@ -168,12 +170,12 @@ exec distance-matrix '{"origins": ["Tokyo Tower"], "destinations": ["Shibuya Sta
168
170
 
169
171
  ---
170
172
 
171
- ## elevation
173
+ ## maps_elevation
172
174
 
173
175
  Get elevation data for geographic coordinates.
174
176
 
175
177
  ```bash
176
- exec elevation '{"locations": [{"latitude": 35.6586, "longitude": 139.7454}]}'
178
+ exec maps_elevation '{"locations": [{"latitude": 35.6586, "longitude": 139.7454}]}'
177
179
  ```
178
180
 
179
181
  | Param | Type | Required | Description |
@@ -187,12 +189,12 @@ Response:
187
189
 
188
190
  ---
189
191
 
190
- ## timezone
192
+ ## maps_timezone
191
193
 
192
194
  Get timezone and local time for coordinates.
193
195
 
194
196
  ```bash
195
- exec timezone '{"latitude": 35.6586, "longitude": 139.7454}'
197
+ exec maps_timezone '{"latitude": 35.6586, "longitude": 139.7454}'
196
198
  ```
197
199
 
198
200
  | Param | Type | Required | Description |
@@ -208,13 +210,15 @@ Response:
208
210
 
209
211
  ---
210
212
 
211
- ## weather
213
+ ## maps_weather
214
+
215
+ Get current weather or forecast.
212
216
 
213
- Get current weather or forecast. Coverage: most regions, but China, Japan, South Korea, Cuba, Iran, North Korea, Syria are unsupported.
217
+ > **Known limitation:** Unsupported regions: China, Japan, South Korea, Cuba, Iran, North Korea, Syria. For these regions, use web search as fallback. `maps_air_quality` works in these regions (different API).
214
218
 
215
219
  ```bash
216
- exec weather '{"latitude": 37.4220, "longitude": -122.0841}'
217
- exec weather '{"latitude": 37.4220, "longitude": -122.0841, "type": "forecast_daily", "forecastDays": 3}'
220
+ exec maps_weather '{"latitude": 37.4220, "longitude": -122.0841}'
221
+ exec maps_weather '{"latitude": 37.4220, "longitude": -122.0841, "type": "forecast_daily", "forecastDays": 3}'
218
222
  ```
219
223
 
220
224
  | Param | Type | Required | Description |
@@ -227,13 +231,13 @@ exec weather '{"latitude": 37.4220, "longitude": -122.0841, "type": "forecast_da
227
231
 
228
232
  ---
229
233
 
230
- ## air-quality
234
+ ## maps_air_quality
231
235
 
232
236
  Get air quality index, pollutant concentrations, and health recommendations for a location.
233
237
 
234
238
  ```bash
235
- exec air-quality '{"latitude": 35.6762, "longitude": 139.6503}'
236
- exec air-quality '{"latitude": 35.6762, "longitude": 139.6503, "includePollutants": true}'
239
+ exec maps_air_quality '{"latitude": 35.6762, "longitude": 139.6503}'
240
+ exec maps_air_quality '{"latitude": 35.6762, "longitude": 139.6503, "includePollutants": true}'
237
241
  ```
238
242
 
239
243
  | Param | Type | Required | Description |
@@ -261,18 +265,18 @@ Response:
261
265
  }
262
266
  ```
263
267
 
264
- Chaining: `geocode` → `air-quality` when the user gives an address instead of coordinates.
268
+ Chaining: `maps_geocode` → `maps_air_quality` when the user gives an address instead of coordinates.
265
269
 
266
270
  ---
267
271
 
268
- ## static-map
272
+ ## maps_static_map
269
273
 
270
274
  Generate a map image with markers, paths, or routes. Returns an inline PNG image.
271
275
 
272
276
  ```bash
273
- exec static-map '{"center": "Tokyo Tower", "zoom": 14}'
274
- exec static-map '{"markers": ["color:red|label:A|35.6586,139.7454", "color:blue|label:B|35.6595,139.7006"]}'
275
- exec static-map '{"markers": ["color:red|35.6586,139.7454"], "maptype": "satellite", "zoom": 16}'
277
+ exec maps_static_map '{"center": "Tokyo Tower", "zoom": 14}'
278
+ exec maps_static_map '{"markers": ["color:red|label:A|35.6586,139.7454", "color:blue|label:B|35.6595,139.7006"]}'
279
+ exec maps_static_map '{"markers": ["color:red|35.6586,139.7454"], "maptype": "satellite", "zoom": 16}'
276
280
  ```
277
281
 
278
282
  | Param | Type | Required | Description |
@@ -287,19 +291,49 @@ exec static-map '{"markers": ["color:red|35.6586,139.7454"], "maptype": "satelli
287
291
  Response: MCP image content (inline PNG) + size metadata.
288
292
 
289
293
  Chaining patterns:
290
- - `search-nearby` → `static-map` (mark found places on map)
291
- - `plan-route` / `directions` → `static-map` (draw the route with path + markers)
292
- - `explore-area` → `static-map` (visualize neighborhood search results)
293
- - `compare-places` → `static-map` (show compared places side by side)
294
+ - `maps_search_nearby` → `maps_static_map` (mark found places on map)
295
+ - `maps_plan_route` / `maps_directions` → `maps_static_map` (draw the route with path + markers)
296
+ - `maps_explore_area` → `maps_static_map` (visualize neighborhood search results)
297
+ - `maps_compare_places` → `maps_static_map` (show compared places side by side)
294
298
 
295
299
  ---
296
300
 
297
- ## explore-area (composite)
301
+ ## maps_search_along_route
302
+
303
+ Search for places along a route between two points. Results ranked by minimal detour time — perfect for finding meals, cafes, or attractions "on the way" between landmarks.
304
+
305
+ ```bash
306
+ exec maps_search_along_route '{"textQuery": "restaurant", "origin": "Fushimi Inari, Kyoto", "destination": "Kiyomizu-dera, Kyoto", "mode": "walking"}'
307
+ ```
308
+
309
+ | Param | Type | Required | Description |
310
+ |-------|------|----------|-------------|
311
+ | textQuery | string | yes | What to search for ("restaurant", "cafe", "temple") |
312
+ | origin | string | yes | Route start point |
313
+ | destination | string | yes | Route end point |
314
+ | mode | string | no | walking, driving, bicycling, transit (default: walking) |
315
+ | maxResults | number | no | Max results (default: 5, max: 20) |
316
+
317
+ Response:
318
+ ```json
319
+ {
320
+ "places": [
321
+ { "name": "SUSHI MATSUHIRO", "rating": 5.0, "location": { "lat": 34.968, "lng": 135.771 } }
322
+ ],
323
+ "route": { "distance": "4.0 km", "duration": "58 mins", "polyline": "..." }
324
+ }
325
+ ```
326
+
327
+ Key for trip planning: use this between consecutive anchors to find **along-the-way** stops instead of searching at endpoints.
328
+
329
+ ---
330
+
331
+ ## maps_explore_area (composite)
298
332
 
299
333
  Explore a neighborhood in one call. Internally chains geocode → search-nearby (per type) → place-details (top N).
300
334
 
301
335
  ```bash
302
- exec explore-area '{"location": "Tokyo Tower", "types": ["restaurant", "cafe"], "topN": 2}'
336
+ exec maps_explore_area '{"location": "Tokyo Tower", "types": ["restaurant", "cafe"], "topN": 2}'
303
337
  ```
304
338
 
305
339
  | Param | Type | Required | Description |
@@ -311,12 +345,12 @@ exec explore-area '{"location": "Tokyo Tower", "types": ["restaurant", "cafe"],
311
345
 
312
346
  ---
313
347
 
314
- ## plan-route (composite)
348
+ ## maps_plan_route (composite)
315
349
 
316
350
  Plan an optimized multi-stop route. Internally chains geocode → distance-matrix → nearest-neighbor → directions.
317
351
 
318
352
  ```bash
319
- exec plan-route '{"stops": ["Tokyo Tower", "Shibuya Station", "Shinjuku Station", "Ueno Park"], "mode": "driving"}'
353
+ exec maps_plan_route '{"stops": ["Tokyo Tower", "Shibuya Station", "Shinjuku Station", "Ueno Park"], "mode": "driving"}'
320
354
  ```
321
355
 
322
356
  | Param | Type | Required | Description |
@@ -327,12 +361,12 @@ exec plan-route '{"stops": ["Tokyo Tower", "Shibuya Station", "Shinjuku Station"
327
361
 
328
362
  ---
329
363
 
330
- ## compare-places (composite)
364
+ ## maps_compare_places (composite)
331
365
 
332
366
  Compare places side-by-side. Internally chains search-places → place-details → distance-matrix.
333
367
 
334
368
  ```bash
335
- exec compare-places '{"query": "ramen near Shibuya", "limit": 3}'
369
+ exec maps_compare_places '{"query": "ramen near Shibuya", "limit": 3}'
336
370
  ```
337
371
 
338
372
  | Param | Type | Required | Description |
@@ -349,37 +383,37 @@ exec compare-places '{"query": "ramen near Shibuya", "limit": 3}'
349
383
 
350
384
  **Search → Details** — Find places, then get full info on the best ones.
351
385
  ```
352
- search-places {"query":"Michelin restaurants in Taipei"}
353
- place-details {"placeId":"ChIJ..."} ← use place_id from results
386
+ maps_search_places {"query":"Michelin restaurants in Taipei"}
387
+ maps_place_details {"placeId":"ChIJ..."} ← use place_id from results
354
388
  ```
355
389
 
356
390
  **Geocode → Nearby** — Turn a landmark into coordinates, then explore the area.
357
391
  ```
358
- geocode {"address":"Taipei 101"}
359
- search-nearby {"center":{"value":"25.033,121.564","isCoordinates":true},"keyword":"cafe","radius":500}
392
+ maps_geocode {"address":"Taipei 101"}
393
+ maps_search_nearby {"center":{"value":"25.033,121.564","isCoordinates":true},"keyword":"cafe","radius":500}
360
394
  ```
361
395
 
362
396
  **Multi-point Comparison** — Compare distances across multiple origins and destinations in one call.
363
397
  ```
364
- distance-matrix {"origins":["Taipei Main Station","Banqiao Station"],"destinations":["Taoyuan Airport","Songshan Airport"],"mode":"driving"}
398
+ maps_distance_matrix {"origins":["Taipei Main Station","Banqiao Station"],"destinations":["Taoyuan Airport","Songshan Airport"],"mode":"driving"}
365
399
  ```
366
400
 
367
401
  **Geocode → Air Quality** — Check air quality at a named location.
368
402
  ```
369
- geocode {"address":"Tokyo"}
370
- air-quality {"latitude":35.6762,"longitude":139.6503}
403
+ maps_geocode {"address":"Tokyo"}
404
+ maps_air_quality {"latitude":35.6762,"longitude":139.6503}
371
405
  ```
372
406
 
373
407
  **Search → Map** — Find places, then show them on a map.
374
408
  ```
375
- search-nearby {"center":{"value":"35.6586,139.7454","isCoordinates":true},"keyword":"cafe","radius":500}
376
- static-map {"markers":["color:red|label:1|lat1,lng1","color:red|label:2|lat2,lng2"]}
409
+ maps_search_nearby {"center":{"value":"35.6586,139.7454","isCoordinates":true},"keyword":"cafe","radius":500}
410
+ maps_static_map {"markers":["color:red|label:1|lat1,lng1","color:red|label:2|lat2,lng2"]}
377
411
  ```
378
412
 
379
413
  **Directions → Map** — Get a route, then visualize it.
380
414
  ```
381
- directions {"origin":"Tokyo Tower","destination":"Shibuya Station","mode":"walking"}
382
- static-map {"path":["color:0x4285F4|weight:4|lat1,lng1|lat2,lng2|..."],"markers":["color:green|label:A|origin","color:red|label:B|dest"]}
415
+ maps_directions {"origin":"Tokyo Tower","destination":"Shibuya Station","mode":"walking"}
416
+ maps_static_map {"path":["color:0x4285F4|weight:4|lat1,lng1|lat2,lng2|..."],"markers":["color:green|label:A|origin","color:red|label:B|dest"]}
383
417
  ```
384
418
 
385
419
  ---
@@ -392,23 +426,53 @@ Use these recipes when the user's question maps to a multi-step workflow. Think
392
426
 
393
427
  This is the most common complex scenario. The goal is a time-ordered itinerary with routes between stops.
394
428
 
429
+ > **Read `references/travel-planning.md` first** — it contains the full methodology, anti-patterns, and time budget guidelines.
430
+
395
431
  **Steps:**
396
- 1. `geocode` — Resolve all mentioned landmarks to coordinates
397
- 2. `search-nearby`Find restaurants/attractions near each landmark (use coordinates from step 1)
398
- 3. `place-details` — Get ratings, hours, reviews for top candidates (use place_id from step 2)
399
- 4. `distance-matrix` — Compare travel times between all candidate stops to find the optimal order
400
- 5. `directions` — Generate turn-by-turn routes between stops in the final order
432
+ 1. `maps_search_places` — Search "top attractions in {city}" → geographically diverse **anchor points**
433
+ 2. **Design arcs** Group nearby anchors into same-day arcs. One direction per day (south→north).
434
+ 3. `maps_search_along_route` — Between each pair of anchors, find restaurants/cafes **along the walking route** (ranked by minimal detour)
435
+ 4. `maps_place_details` — Get ratings, hours for top candidates
436
+ 5. `maps_plan_route` — Validate each day's route. Use `optimize: false` (you already know the geographic order).
437
+ 6. `maps_weather` + `maps_air_quality` — Adjust for conditions. **Note:** `maps_weather` is unavailable in Japan/China/Korea — use web search fallback.
438
+ 7. `maps_static_map` — **Always** visualize each day with numbered markers + path
401
439
 
402
440
  **Key decisions:**
403
- - If the user says "near X", use `search-nearby`. If they say "best Y in Z", use `search-places`.
404
- - Always check `opening_hours` from `place-details` before including in itinerary.
405
- - Use `distance-matrix` to order stops efficiently, THEN use `directions` for the final route.
441
+ - **Use `maps_search_along_route` for meals and breaks** not maps_explore_area or maps_search_nearby. Along-route results are on the path, not random nearby points.
442
+ - **Never backtrack**: stops progress in one direction per day.
443
+ - Alternate activity types: temple food walk shrine cafe.
444
+ - Budget 5-7 stops per day max. Major temples = 90-120 min.
445
+ - Edge landmarks (geographically isolated) go at start or end of a day.
446
+ - **Always generate a map** for each day.
447
+
448
+ **Example flow (Kyoto 2-day):**
449
+ ```
450
+ maps_search_places("top attractions in Kyoto")
451
+ → Fushimi Inari(south), Kiyomizu(east), Kinkaku-ji(north), Arashiyama(west)
452
+
453
+ Day 1 arc: south→center — Fushimi → Kiyomizu → Gion → Pontocho
454
+ Day 2 arc: center→west — Nishiki → Nijo Castle → Arashiyama
455
+
456
+ maps_search_along_route("restaurant", "Fushimi Inari", "Kiyomizu-dera", "walking")
457
+ → finds lunch options ALONG the 4km route (not at endpoints)
458
+
459
+ maps_search_along_route("kaiseki restaurant", "Gion, Kyoto", "Arashiyama, Kyoto")
460
+ → finds dinner along the afternoon route
406
461
 
407
- **Example output shape:**
462
+ maps_plan_route(Day 1 stops, optimize:false) → maps_static_map(Day 1)
463
+ maps_plan_route(Day 2 stops, optimize:false) → maps_static_map(Day 2)
408
464
  ```
409
- Morning: Tokyo Tower (9:00) → 12 min walk → Zojoji Temple (9:30)
410
- Lunch: Sushi Dai (11:30) ★4.6 — 2.1 km, 8 min by transit
411
- Afternoon: TeamLab (14:00) → Odaiba area
465
+
466
+ **Example output:**
467
+ ```
468
+ Day 1: South → Center arc
469
+ 08:30 Fushimi Inari (90 min) → 25 min transit
470
+ 10:30 Kiyomizu-dera (90 min) → walk down Sannen-zaka
471
+ 12:30 [along-route find] Gion lunch ★4.7 (75 min)
472
+ 14:00 Yasaka Shrine (30 min) → 15 min walk
473
+ 14:45 Pontocho stroll + cafe (45 min)
474
+ 17:30 Dinner near Kawaramachi
475
+ [map with markers 1-6 and walking path]
412
476
  ```
413
477
 
414
478
  ---
@@ -418,9 +482,9 @@ Afternoon: TeamLab (14:00) → Odaiba area
418
482
  User asks about places around a location. May or may not specify what type.
419
483
 
420
484
  **Steps:**
421
- 1. `geocode` — Resolve the location (skip if user gave coordinates)
422
- 2. `search-nearby` — Search with keyword + radius. Use `openNow: true` if the user implies "right now"
423
- 3. `place-details` — Get details for the top 3-5 results (ratings, reviews, hours)
485
+ 1. `maps_geocode` — Resolve the location (skip if user gave coordinates)
486
+ 2. `maps_search_nearby` — Search with keyword + radius. Use `openNow: true` if the user implies "right now"
487
+ 3. `maps_place_details` — Get details for the top 3-5 results (ratings, reviews, hours)
424
488
 
425
489
  **Key decisions:**
426
490
  - If no keyword specified, search multiple types: restaurant, cafe, attraction
@@ -434,9 +498,9 @@ User asks about places around a location. May or may not specify what type.
434
498
  User wants to compare travel options between two points.
435
499
 
436
500
  **Steps:**
437
- 1. `directions` with `mode: "driving"` — Get driving route
438
- 2. `directions` with `mode: "transit"` — Get transit route
439
- 3. `directions` with `mode: "walking"` — Get walking route (if distance < 5 km)
501
+ 1. `maps_directions` with `mode: "driving"` — Get driving route
502
+ 2. `maps_directions` with `mode: "transit"` — Get transit route
503
+ 3. `maps_directions` with `mode: "walking"` — Get walking route (if distance < 5 km)
440
504
 
441
505
  **Present as comparison table:**
442
506
  ```
@@ -454,15 +518,15 @@ User wants to compare travel options between two points.
454
518
  User wants to evaluate a location for living, working, or investing.
455
519
 
456
520
  **Steps:**
457
- 1. `geocode` — Resolve the address
458
- 2. `search-nearby` — Run multiple searches from the same center:
521
+ 1. `maps_geocode` — Resolve the address
522
+ 2. `maps_search_nearby` — Run multiple searches from the same center:
459
523
  - `keyword: "school"` radius 2000
460
524
  - `keyword: "hospital"` radius 3000
461
525
  - `keyword: "supermarket"` radius 1000
462
526
  - `keyword: "restaurant"` radius 500
463
527
  - `keyword: "park"` radius 1000
464
- 3. `distance-matrix` — Calculate commute time to important locations (office, airport, city center)
465
- 4. `elevation` — Check if the area is in a low-elevation flood zone
528
+ 3. `maps_distance_matrix` — Calculate commute time to important locations (office, airport, city center)
529
+ 4. `maps_elevation` — Check if the area is in a low-elevation flood zone
466
530
 
467
531
  **Present as scorecard:**
468
532
  ```
@@ -481,14 +545,14 @@ Elevation: 45m (not a flood risk)
481
545
  User has a list of places and wants the optimal visit order.
482
546
 
483
547
  **Steps:**
484
- 1. `geocode` — Resolve all addresses to coordinates
485
- 2. `distance-matrix` — Calculate NxN matrix (all origins × all destinations)
548
+ 1. `maps_geocode` — Resolve all addresses to coordinates
549
+ 2. `maps_distance_matrix` — Calculate NxN matrix (all origins × all destinations)
486
550
  3. Use the matrix to determine the nearest-neighbor route order
487
- 4. `directions` — Generate route for the final order (chain waypoints)
551
+ 4. `maps_directions` — Generate route for the final order (chain waypoints)
488
552
 
489
553
  **Key decisions:**
490
554
  - For ≤ 5 stops, nearest-neighbor heuristic is good enough
491
- - For the `directions` call, set origin = first stop, destination = last stop, and mention intermediate stops in conversation
555
+ - For the `maps_directions` call, set origin = first stop, destination = last stop, and mention intermediate stops in conversation
492
556
  - If the user says "return to start", plan a round trip
493
557
 
494
558
  ---
@@ -498,9 +562,9 @@ User has a list of places and wants the optimal visit order.
498
562
  User is choosing between specific places.
499
563
 
500
564
  **Steps:**
501
- 1. `search-places` — Find each place (or use place_id if already known)
502
- 2. `place-details` — Get full details for each candidate
503
- 3. `distance-matrix` — Calculate distance from user's location to each candidate
565
+ 1. `maps_search_places` — Find each place (or use place_id if already known)
566
+ 2. `maps_place_details` — Get full details for each candidate
567
+ 3. `maps_distance_matrix` — Calculate distance from user's location to each candidate
504
568
 
505
569
  **Present as comparison:**
506
570
  ```
@@ -518,13 +582,17 @@ User is choosing between specific places.
518
582
  User wants to find things along a route (gas stations, rest stops, food).
519
583
 
520
584
  **Steps:**
521
- 1. `directions` — Get the route first, extract key waypoints from the steps
522
- 2. `search-nearby` — Search near 2-3 midpoints along the route
523
- 3. `place-details` — Get details for top results at each midpoint
585
+ 1. `maps_search_along_route` — Search directly along the route (preferred results ranked by minimal detour time)
586
+ 2. `maps_place_details` — Get details for top results
587
+
588
+ **Fallback** (if maps_search_along_route is unavailable):
589
+ 1. `maps_directions` — Get the route first, extract key waypoints from the steps
590
+ 2. `maps_search_nearby` — Search near 2-3 midpoints along the route
591
+ 3. `maps_place_details` — Get details for top results at each midpoint
524
592
 
525
593
  **Key decisions:**
526
- - Extract waypoints at roughly equal intervals along the route
527
- - Use the `start_location` of route steps at ~1/3 and ~2/3 of the total distance
594
+ - Prefer `maps_search_along_route` it uses Google's Routes API to rank results by actual detour time, not just proximity
595
+ - If using the fallback, extract waypoints at roughly equal intervals along the route
528
596
  - Set `radius` based on road type: 1000m for highways, 500m for city streets
529
597
 
530
598
  ---
@@ -533,22 +601,10 @@ User wants to find things along a route (gas stations, rest stops, food).
533
601
 
534
602
  | User says... | Recipe | First tool |
535
603
  |-------------|--------|------------|
536
- | "Plan a trip / itinerary / day in X" | Trip Planning | `geocode` |
537
- | "What's near X / around X" | Local Discovery | `geocode` → `search-nearby` |
538
- | "How do I get to X" / "route from A to B" | Route Comparison | `directions` |
539
- | "Is X a good neighborhood" / "analyze this area" | Neighborhood Analysis | `geocode` |
540
- | "Visit A, B, C, D efficiently" | Multi-Stop Route | `geocode` → `distance-matrix` |
541
- | "Which X should I pick" / "compare these" | Place Comparison | `search-places` |
542
- | "Find gas stations on the way to X" | Along the Route | `directions` → `search-nearby` |
543
-
544
- ---
545
-
546
- ## Future Composite Tools (Planned)
547
-
548
- These high-frequency scenarios are candidates for single-call composite tools in a future version:
549
-
550
- | Composite Tool | What it would do | Replaces |
551
- |---------------|-----------------|----------|
552
- | `maps_explore_area` | geocode + multi-type search-nearby + place-details for top results | Recipe 2 (3-call → 1-call) |
553
- | `maps_plan_route` | geocode all stops + distance-matrix + directions in optimal order | Recipe 5 (4-call → 1-call) |
554
- | `maps_compare_places` | search + details + distance for N candidates | Recipe 6 (3-call → 1-call) |
604
+ | "Plan a trip / itinerary / day in X" | Trip Planning | `maps_search_places` |
605
+ | "What's near X / around X" | Local Discovery | `maps_geocode` → `maps_search_nearby` |
606
+ | "How do I get to X" / "route from A to B" | Route Comparison | `maps_directions` |
607
+ | "Is X a good neighborhood" / "analyze this area" | Neighborhood Analysis | `maps_geocode` |
608
+ | "Visit A, B, C, D efficiently" | Multi-Stop Route | `maps_geocode` → `maps_distance_matrix` |
609
+ | "Which X should I pick" / "compare these" | Place Comparison | `maps_search_places` |
610
+ | "Find gas stations on the way to X" | Along the Route | `maps_search_along_route` |