@cablate/mcp-google-map 0.0.24 → 0.0.25

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@cablate/mcp-google-map",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "Google Maps MCP server with streamable HTTP transport support for location services, geocoding, and navigation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,7 +10,8 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "dist/**/*.map",
13
- "README.md"
13
+ "README.md",
14
+ "skills"
14
15
  ],
15
16
  "scripts": {
16
17
  "build": "tsup --dts",
@@ -28,16 +29,21 @@
28
29
  },
29
30
  "keywords": [
30
31
  "google",
32
+ "google-maps",
31
33
  "map",
32
- "api",
33
- "llm",
34
- "typescript",
35
34
  "mcp",
36
- "server",
37
- "streamable",
38
- "location",
35
+ "mcp-server",
36
+ "model-context-protocol",
37
+ "agent-skill",
38
+ "ai-agent",
39
+ "geospatial",
39
40
  "geocoding",
40
- "navigation"
41
+ "places",
42
+ "directions",
43
+ "navigation",
44
+ "location",
45
+ "streamable-http",
46
+ "typescript"
41
47
  ],
42
48
  "author": "CabLate",
43
49
  "license": "MIT",
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: google-maps
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
+ ---
5
+
6
+ # Google Maps - Geospatial Query Capabilities
7
+
8
+ ## Overview
9
+
10
+ Gives an AI Agent the ability to reason about physical space — understand locations, distances, routes, and elevation, and naturally weave that information into conversation.
11
+
12
+ Without this Skill, the agent can only guess or refuse when asked "how do I get from Taipei 101 to the National Palace Museum?". With it, the agent returns exact coordinates, step-by-step routes, and travel times.
13
+
14
+ ---
15
+
16
+ ## Core Principles
17
+
18
+ | Principle | Explanation |
19
+ |-----------|-------------|
20
+ | Chain over single-shot | Most geo questions require chaining: geocode → search-nearby → place-details. Think about the full pipeline when planning queries. |
21
+ | Precise input saves trouble | Use coordinates over address strings when available. Use place_id over name search. More precise input = more reliable output. |
22
+ | Output is structured | Every tool returns JSON. Use it directly for downstream computation or comparison — no extra parsing needed. |
23
+
24
+ ---
25
+
26
+ ## Tool Map
27
+
28
+ 8 tools in three categories — pick by scenario:
29
+
30
+ ### Place Discovery
31
+ | Tool | When to use | Example |
32
+ |------|-------------|---------|
33
+ | `geocode` | Have an address/landmark, need coordinates | "What are the coordinates of Tokyo Tower?" |
34
+ | `reverse-geocode` | Have coordinates, need an address | "What's at 35.65, 139.74?" |
35
+ | `search-nearby` | Know a location, find nearby places by type | "Coffee shops near my hotel" |
36
+ | `search-places` | Natural language place search | "Best ramen in Tokyo" |
37
+ | `place-details` | Have a place_id, need full info | "Opening hours and reviews for this restaurant?" |
38
+
39
+ ### Routing & Distance
40
+ | Tool | When to use | Example |
41
+ |------|-------------|---------|
42
+ | `directions` | How to get from A to B | "Route from Taipei Main Station to the airport" |
43
+ | `distance-matrix` | Compare distances across multiple points | "Which of these 3 hotels is closest to the airport?" |
44
+
45
+ ### Terrain
46
+ | Tool | When to use | Example |
47
+ |------|-------------|---------|
48
+ | `elevation` | Query altitude | "Elevation profile along this hiking trail" |
49
+
50
+ ---
51
+
52
+ ## Invocation
53
+
54
+ ```bash
55
+ npx @cablate/mcp-google-map exec <tool> '<json_params>' [-k API_KEY]
56
+ ```
57
+
58
+ - **API Key**: `-k` flag or `GOOGLE_MAPS_API_KEY` environment variable
59
+ - **Output**: JSON to stdout, errors to stderr
60
+ - **Stateless**: each call is independent
61
+
62
+ ---
63
+
64
+ ## When to Update This Skill
65
+
66
+ | Trigger | What to update |
67
+ |---------|----------------|
68
+ | New tool added to the package | Tool Map table + references/tools-api.md |
69
+ | Tool parameters changed | references/tools-api.md |
70
+ | New chaining pattern discovered in practice | references/tools-api.md chaining section |
71
+
72
+ ---
73
+
74
+ ## Reference
75
+
76
+ | File | Content | When to read |
77
+ |------|---------|--------------|
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 |
@@ -0,0 +1,180 @@
1
+ # Google Maps Tools - Parameter & Response Reference
2
+
3
+ ## geocode
4
+
5
+ Convert an address or landmark name to GPS coordinates.
6
+
7
+ ```bash
8
+ exec geocode '{"address": "Tokyo Tower"}'
9
+ ```
10
+
11
+ | Param | Type | Required | Description |
12
+ |-------|------|----------|-------------|
13
+ | address | string | yes | Address or landmark name |
14
+
15
+ Response:
16
+ ```json
17
+ {
18
+ "success": true,
19
+ "data": {
20
+ "location": { "lat": 35.6585805, "lng": 139.7454329 },
21
+ "formatted_address": "4-chome-2-8 Shibakoen, Minato City, Tokyo 105-0011, Japan",
22
+ "place_id": "ChIJCewJkL2LGGAR3Qmk0vCTGkg"
23
+ }
24
+ }
25
+ ```
26
+
27
+ ---
28
+
29
+ ## reverse-geocode
30
+
31
+ Convert GPS coordinates to a street address.
32
+
33
+ ```bash
34
+ exec reverse-geocode '{"latitude": 35.6586, "longitude": 139.7454}'
35
+ ```
36
+
37
+ | Param | Type | Required | Description |
38
+ |-------|------|----------|-------------|
39
+ | latitude | number | yes | Latitude |
40
+ | longitude | number | yes | Longitude |
41
+
42
+ Response:
43
+ ```json
44
+ {
45
+ "success": true,
46
+ "data": {
47
+ "formatted_address": "...",
48
+ "place_id": "ChIJ...",
49
+ "address_components": [...]
50
+ }
51
+ }
52
+ ```
53
+
54
+ ---
55
+
56
+ ## search-nearby
57
+
58
+ Find places near a location by type.
59
+
60
+ ```bash
61
+ exec search-nearby '{"center": {"value": "35.6586,139.7454", "isCoordinates": true}, "keyword": "restaurant", "radius": 500}'
62
+ ```
63
+
64
+ | Param | Type | Required | Description |
65
+ |-------|------|----------|-------------|
66
+ | center | object | yes | `{ value: string, isCoordinates: boolean }` — address or `lat,lng` |
67
+ | keyword | string | no | Place type (restaurant, cafe, hotel, gas_station, hospital, etc.) |
68
+ | radius | number | no | Search radius in meters (default: 1000) |
69
+ | openNow | boolean | no | Only show currently open places |
70
+ | minRating | number | no | Minimum rating (0-5) |
71
+
72
+ Response: `{ success, location, data: [{ name, place_id, formatted_address, geometry, rating, user_ratings_total, opening_hours }] }`
73
+
74
+ ---
75
+
76
+ ## search-places
77
+
78
+ Free-text place search. More flexible than search-nearby.
79
+
80
+ ```bash
81
+ exec search-places '{"query": "ramen in Tokyo"}'
82
+ ```
83
+
84
+ | Param | Type | Required | Description |
85
+ |-------|------|----------|-------------|
86
+ | query | string | yes | Natural language search query |
87
+ | locationBias | object | no | `{ latitude, longitude, radius? }` to bias results toward |
88
+ | openNow | boolean | no | Only show currently open places |
89
+ | minRating | number | no | Minimum rating (1.0-5.0) |
90
+ | includedType | string | no | Place type filter |
91
+
92
+ Response: `{ success, data: [{ name, place_id, address, location, rating, total_ratings, open_now }] }`
93
+
94
+ ---
95
+
96
+ ## place-details
97
+
98
+ Get full details for a place by its place_id (from search results). Returns reviews, phone, website, hours, photos.
99
+
100
+ ```bash
101
+ exec place-details '{"placeId": "ChIJCewJkL2LGGAR3Qmk0vCTGkg"}'
102
+ ```
103
+
104
+ | Param | Type | Required | Description |
105
+ |-------|------|----------|-------------|
106
+ | placeId | string | yes | Google Maps place ID (from search results) |
107
+
108
+ ---
109
+
110
+ ## directions
111
+
112
+ Get step-by-step navigation between two points.
113
+
114
+ ```bash
115
+ exec directions '{"origin": "Tokyo Tower", "destination": "Shibuya Station", "mode": "transit"}'
116
+ ```
117
+
118
+ | Param | Type | Required | Description |
119
+ |-------|------|----------|-------------|
120
+ | origin | string | yes | Starting point (address or landmark) |
121
+ | destination | string | yes | End point (address or landmark) |
122
+ | mode | string | no | Travel mode: driving, walking, bicycling, transit |
123
+ | departure_time | string | no | Departure time (ISO 8601 or "now") |
124
+ | arrival_time | string | no | Desired arrival time (transit only) |
125
+
126
+ ---
127
+
128
+ ## distance-matrix
129
+
130
+ Calculate travel distances and times between multiple origins and destinations.
131
+
132
+ ```bash
133
+ exec distance-matrix '{"origins": ["Tokyo Tower"], "destinations": ["Shibuya Station", "Shinjuku Station"], "mode": "driving"}'
134
+ ```
135
+
136
+ | Param | Type | Required | Description |
137
+ |-------|------|----------|-------------|
138
+ | origins | string[] | yes | List of origin addresses |
139
+ | destinations | string[] | yes | List of destination addresses |
140
+ | mode | string | no | Travel mode: driving, walking, bicycling, transit |
141
+
142
+ ---
143
+
144
+ ## elevation
145
+
146
+ Get elevation data for geographic coordinates.
147
+
148
+ ```bash
149
+ exec elevation '{"locations": [{"latitude": 35.6586, "longitude": 139.7454}]}'
150
+ ```
151
+
152
+ | Param | Type | Required | Description |
153
+ |-------|------|----------|-------------|
154
+ | locations | object[] | yes | Array of `{ latitude, longitude }` |
155
+
156
+ Response:
157
+ ```json
158
+ [{ "elevation": 17.23, "location": { "lat": 35.6586, "lng": 139.7454 }, "resolution": 610.81 }]
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Common Chaining Patterns
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
169
+ ```
170
+
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}'
175
+ ```
176
+
177
+ **Multi-point Comparison**
178
+ ```bash
179
+ exec distance-matrix '{"origins":["Taipei Main Station","Banqiao Station"],"destinations":["Taoyuan Airport","Songshan Airport"],"mode":"driving"}'
180
+ ```