@cablate/mcp-google-map 0.0.26 → 0.0.28

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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cablate/mcp-google-map",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "mcpName": "io.github.cablate/google-map",
5
- "description": "Google Maps tools for AI agents — 8 tools (geocode, search, directions, elevation) via MCP server or standalone Agent Skill CLI",
5
+ "description": "Google Maps tools for AI agents — geocode, search, directions, elevation via MCP server or standalone CLI",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "bin": {
@@ -1,6 +1,14 @@
1
1
  ---
2
2
  name: google-maps
3
3
  description: Geospatial query capabilities — geocoding, nearby search, routing, place details, elevation. Trigger when the user mentions locations, addresses, coordinates, navigation, "what's nearby", "how to get there", distance/duration, or any question that inherently involves geographic information — even if they don't explicitly say "map". Update when new tools are added or tool parameters change.
4
+ license: MIT
5
+ version: 0.0.25
6
+ compatibility:
7
+ - claude-code
8
+ - cursor
9
+ - vscode-copilot
10
+ - openai-codex
11
+ - gemini-cli
4
12
  ---
5
13
 
6
14
  # Google Maps - Geospatial Query Capabilities
@@ -17,9 +25,11 @@ Without this Skill, the agent can only guess or refuse when asked "how do I get
17
25
 
18
26
  | Principle | Explanation |
19
27
  |-----------|-------------|
20
- | Chain over single-shot | Most geo questions require chaining: geocode search-nearby place-details. Think about the full pipeline when planning queries. |
28
+ | Chain over single-shot | Most geo questions require 2-5 tool calls chained together. See Scenario Recipes in references/tools-api.md for the full patterns. |
29
+ | Match recipe to intent | Map the user's question to a recipe (Trip Planning, Local Discovery, Route Comparison, Neighborhood Analysis, Multi-Stop, Place Comparison, Along the Route) before calling any tool. |
21
30
  | Precise input saves trouble | Use coordinates over address strings when available. Use place_id over name search. More precise input = more reliable output. |
22
31
  | Output is structured | Every tool returns JSON. Use it directly for downstream computation or comparison — no extra parsing needed. |
32
+ | Present as tables | Users prefer comparison tables and scorecards over raw JSON. Format results for readability. |
23
33
 
24
34
  ---
25
35
 
@@ -75,4 +85,4 @@ npx @cablate/mcp-google-map exec <tool> '<json_params>' [-k API_KEY]
75
85
 
76
86
  | File | Content | When to read |
77
87
  |------|---------|--------------|
78
- | `references/tools-api.md` | Full parameter specs, response formats, and chaining patterns for all 8 tools | When you need exact parameter names, types, response shapes, or multi-tool workflows |
88
+ | `references/tools-api.md` | Full parameter specs, response formats, 7 scenario recipes, and decision guide | When you need exact parameters, response shapes, or multi-tool workflow patterns |
@@ -160,21 +160,194 @@ Response:
160
160
 
161
161
  ---
162
162
 
163
- ## Common Chaining Patterns
163
+ ## Chaining Patterns
164
164
 
165
- **Search Details**
166
- ```bash
167
- exec search-places '{"query":"Michelin restaurants in Taipei"}'
168
- exec place-details '{"placeId":"ChIJ..."}' # use place_id from results
165
+ ### Basic Patterns
166
+
167
+ **Search → Details** — Find places, then get full info on the best ones.
168
+ ```
169
+ search-places {"query":"Michelin restaurants in Taipei"}
170
+ place-details {"placeId":"ChIJ..."} ← use place_id from results
169
171
  ```
170
172
 
171
- **Geocode → Nearby Search**
172
- ```bash
173
- exec geocode '{"address":"Taipei 101"}'
174
- exec search-nearby '{"center":{"value":"25.033,121.564","isCoordinates":true},"keyword":"cafe","radius":500}'
173
+ **Geocode → Nearby** — Turn a landmark into coordinates, then explore the area.
174
+ ```
175
+ geocode {"address":"Taipei 101"}
176
+ search-nearby {"center":{"value":"25.033,121.564","isCoordinates":true},"keyword":"cafe","radius":500}
175
177
  ```
176
178
 
177
- **Multi-point Comparison**
178
- ```bash
179
- exec distance-matrix '{"origins":["Taipei Main Station","Banqiao Station"],"destinations":["Taoyuan Airport","Songshan Airport"],"mode":"driving"}'
179
+ **Multi-point Comparison** — Compare distances across multiple origins and destinations in one call.
180
+ ```
181
+ distance-matrix {"origins":["Taipei Main Station","Banqiao Station"],"destinations":["Taoyuan Airport","Songshan Airport"],"mode":"driving"}
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Scenario Recipes
187
+
188
+ Use these recipes when the user's question maps to a multi-step workflow. Think of each recipe as a **decision tree**, not a script — adapt based on what the user actually needs.
189
+
190
+ ### Recipe 1: Trip Planning ("Plan a day in Tokyo")
191
+
192
+ This is the most common complex scenario. The goal is a time-ordered itinerary with routes between stops.
193
+
194
+ **Steps:**
195
+ 1. `geocode` — Resolve all mentioned landmarks to coordinates
196
+ 2. `search-nearby` — Find restaurants/attractions near each landmark (use coordinates from step 1)
197
+ 3. `place-details` — Get ratings, hours, reviews for top candidates (use place_id from step 2)
198
+ 4. `distance-matrix` — Compare travel times between all candidate stops to find the optimal order
199
+ 5. `directions` — Generate turn-by-turn routes between stops in the final order
200
+
201
+ **Key decisions:**
202
+ - If the user says "near X", use `search-nearby`. If they say "best Y in Z", use `search-places`.
203
+ - Always check `opening_hours` from `place-details` before including in itinerary.
204
+ - Use `distance-matrix` to order stops efficiently, THEN use `directions` for the final route.
205
+
206
+ **Example output shape:**
207
+ ```
208
+ Morning: Tokyo Tower (9:00) → 12 min walk → Zojoji Temple (9:30)
209
+ Lunch: Sushi Dai (11:30) ★4.6 — 2.1 km, 8 min by transit
210
+ Afternoon: TeamLab (14:00) → Odaiba area
180
211
  ```
212
+
213
+ ---
214
+
215
+ ### Recipe 2: "What's nearby?" / Local Discovery
216
+
217
+ User asks about places around a location. May or may not specify what type.
218
+
219
+ **Steps:**
220
+ 1. `geocode` — Resolve the location (skip if user gave coordinates)
221
+ 2. `search-nearby` — Search with keyword + radius. Use `openNow: true` if the user implies "right now"
222
+ 3. `place-details` — Get details for the top 3-5 results (ratings, reviews, hours)
223
+
224
+ **Key decisions:**
225
+ - If no keyword specified, search multiple types: restaurant, cafe, attraction
226
+ - Use `minRating: 4.0` by default unless the user wants comprehensive results
227
+ - Sort results by rating × review count, not just rating alone
228
+
229
+ ---
230
+
231
+ ### Recipe 3: Route Comparison ("Best way to get from A to B")
232
+
233
+ User wants to compare travel options between two points.
234
+
235
+ **Steps:**
236
+ 1. `directions` with `mode: "driving"` — Get driving route
237
+ 2. `directions` with `mode: "transit"` — Get transit route
238
+ 3. `directions` with `mode: "walking"` — Get walking route (if distance < 5 km)
239
+
240
+ **Present as comparison table:**
241
+ ```
242
+ | Mode | Duration | Distance | Notes |
243
+ |---------|----------|----------|------------------|
244
+ | Driving | 25 min | 12.3 km | Via Highway 1 |
245
+ | Transit | 35 min | — | Metro Line 2 |
246
+ | Walking | 2h 10min | 10.1 km | Not recommended |
247
+ ```
248
+
249
+ ---
250
+
251
+ ### Recipe 4: Neighborhood Analysis ("Is this a good area?")
252
+
253
+ User wants to evaluate a location for living, working, or investing.
254
+
255
+ **Steps:**
256
+ 1. `geocode` — Resolve the address
257
+ 2. `search-nearby` — Run multiple searches from the same center:
258
+ - `keyword: "school"` radius 2000
259
+ - `keyword: "hospital"` radius 3000
260
+ - `keyword: "supermarket"` radius 1000
261
+ - `keyword: "restaurant"` radius 500
262
+ - `keyword: "park"` radius 1000
263
+ 3. `distance-matrix` — Calculate commute time to important locations (office, airport, city center)
264
+ 4. `elevation` — Check if the area is in a low-elevation flood zone
265
+
266
+ **Present as scorecard:**
267
+ ```
268
+ 📍 742 Evergreen Terrace
269
+ Schools within 2km: 4 (avg ★4.2)
270
+ Hospitals within 3km: 2
271
+ Supermarkets within 1km: 3
272
+ Commute to downtown: 22 min driving, 35 min transit
273
+ Elevation: 45m (not a flood risk)
274
+ ```
275
+
276
+ ---
277
+
278
+ ### Recipe 5: Multi-Stop Route ("Visit these 5 places efficiently")
279
+
280
+ User has a list of places and wants the optimal visit order.
281
+
282
+ **Steps:**
283
+ 1. `geocode` — Resolve all addresses to coordinates
284
+ 2. `distance-matrix` — Calculate NxN matrix (all origins × all destinations)
285
+ 3. Use the matrix to determine the nearest-neighbor route order
286
+ 4. `directions` — Generate route for the final order (chain waypoints)
287
+
288
+ **Key decisions:**
289
+ - For ≤ 5 stops, nearest-neighbor heuristic is good enough
290
+ - For the `directions` call, set origin = first stop, destination = last stop, and mention intermediate stops in conversation
291
+ - If the user says "return to start", plan a round trip
292
+
293
+ ---
294
+
295
+ ### Recipe 6: Place Comparison ("Which restaurant should I pick?")
296
+
297
+ User is choosing between specific places.
298
+
299
+ **Steps:**
300
+ 1. `search-places` — Find each place (or use place_id if already known)
301
+ 2. `place-details` — Get full details for each candidate
302
+ 3. `distance-matrix` — Calculate distance from user's location to each candidate
303
+
304
+ **Present as comparison:**
305
+ ```
306
+ | Restaurant | Rating | Reviews | Distance | Price | Open Now |
307
+ |-----------|--------|---------|----------|-------|----------|
308
+ | Sushi Dai | ★4.6 | 2,340 | 1.2 km | $$ | Yes |
309
+ | Tsukiji | ★4.3 | 890 | 0.8 km | $ | Yes |
310
+ | Omakase | ★4.8 | 156 | 3.1 km | $$$$ | No |
311
+ ```
312
+
313
+ ---
314
+
315
+ ### Recipe 7: "Along the Route" Search
316
+
317
+ User wants to find things along a route (gas stations, rest stops, food).
318
+
319
+ **Steps:**
320
+ 1. `directions` — Get the route first, extract key waypoints from the steps
321
+ 2. `search-nearby` — Search near 2-3 midpoints along the route
322
+ 3. `place-details` — Get details for top results at each midpoint
323
+
324
+ **Key decisions:**
325
+ - Extract waypoints at roughly equal intervals along the route
326
+ - Use the `start_location` of route steps at ~1/3 and ~2/3 of the total distance
327
+ - Set `radius` based on road type: 1000m for highways, 500m for city streets
328
+
329
+ ---
330
+
331
+ ## Decision Guide: Which Recipe to Use
332
+
333
+ | User says... | Recipe | First tool |
334
+ |-------------|--------|------------|
335
+ | "Plan a trip / itinerary / day in X" | Trip Planning | `geocode` |
336
+ | "What's near X / around X" | Local Discovery | `geocode` → `search-nearby` |
337
+ | "How do I get to X" / "route from A to B" | Route Comparison | `directions` |
338
+ | "Is X a good neighborhood" / "analyze this area" | Neighborhood Analysis | `geocode` |
339
+ | "Visit A, B, C, D efficiently" | Multi-Stop Route | `geocode` → `distance-matrix` |
340
+ | "Which X should I pick" / "compare these" | Place Comparison | `search-places` |
341
+ | "Find gas stations on the way to X" | Along the Route | `directions` → `search-nearby` |
342
+
343
+ ---
344
+
345
+ ## Future Composite Tools (Planned)
346
+
347
+ These high-frequency scenarios are candidates for single-call composite tools in a future version:
348
+
349
+ | Composite Tool | What it would do | Replaces |
350
+ |---------------|-----------------|----------|
351
+ | `maps_explore_area` | geocode + multi-type search-nearby + place-details for top results | Recipe 2 (3-call → 1-call) |
352
+ | `maps_plan_route` | geocode all stops + distance-matrix + directions in optimal order | Recipe 5 (4-call → 1-call) |
353
+ | `maps_compare_places` | search + details + distance for N candidates | Recipe 6 (3-call → 1-call) |