Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Special thanks to [@junyinnnn](https://github.com/junyinnnn) for helping add sup

| Tool | Description |
|------|-------------|
| `search_nearby` | Find places near a location by type (restaurant, cafe, hotel, etc.). Supports filtering by radius, rating, and open status. |
| `maps_search_nearby` | Find places near a location by type (restaurant, cafe, hotel, etc.). Supports filtering by radius, rating, and open status. |
| `maps_search_places` | Free-text place search (e.g., "sushi restaurants in Tokyo"). Supports location bias, rating, open-now filters. |
| `get_place_details` | Get full details for a place by its place_id — reviews, phone, website, hours, photos. |
| `maps_place_details` | Get full details for a place by its place_id — reviews, phone, website, hours, photos. |
| `maps_geocode` | Convert an address or landmark name into GPS coordinates. |
| `maps_reverse_geocode` | Convert GPS coordinates into a street address. |
| `maps_distance_matrix` | Calculate travel distances and times between multiple origins and destinations. |
Expand Down Expand Up @@ -200,9 +200,9 @@ src/
│ └── toolclass.ts # Legacy Google Maps API client
├── tools/
│ └── maps/
│ ├── searchNearby.ts # search_nearby tool
│ ├── searchNearby.ts # maps_search_nearby tool
│ ├── searchPlaces.ts # maps_search_places tool
│ ├── placeDetails.ts # get_place_details tool
│ ├── placeDetails.ts # maps_place_details tool
│ ├── geocode.ts # maps_geocode tool
│ ├── reverseGeocode.ts # maps_reverse_geocode tool
│ ├── distanceMatrix.ts # maps_distance_matrix tool
Expand Down
2 changes: 2 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"weather",
] as const;

async function execTool(toolName: string, params: any, apiKey: string): Promise<any> {

Check warning on line 91 in src/cli.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type

Check warning on line 91 in src/cli.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type
const searcher = new PlacesSearcher(apiKey);

switch (toolName) {
Expand All @@ -102,6 +102,7 @@

case "search-nearby":
case "search_nearby":
case "maps_search_nearby":
return searcher.searchNearby(params);

case "search-places":
Expand All @@ -116,6 +117,7 @@

case "place-details":
case "get_place_details":
case "maps_place_details":
return searcher.getPlaceDetails(params.placeId);

case "directions":
Expand Down Expand Up @@ -173,7 +175,7 @@
const packageJsonPath = resolve(__dirname, "../package.json");
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
packageVersion = packageJson.version;
} catch (e) {

Check warning on line 178 in src/cli.ts

View workflow job for this annotation

GitHub Actions / ci

'e' is defined but never used
packageVersion = "0.0.0";
}

Expand Down Expand Up @@ -224,7 +226,7 @@
const result = await execTool(argv.tool as string, params, argv.apikey as string);
console.log(JSON.stringify(result, null, 2));
process.exit(0);
} catch (error: any) {

Check warning on line 229 in src/cli.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type
console.error(JSON.stringify({ error: error.message }, null, 2));
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/maps/placeDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from "zod";
import { PlacesSearcher } from "../../services/PlacesSearcher.js";
import { getCurrentApiKey } from "../../utils/requestContext.js";

const NAME = "get_place_details";
const NAME = "maps_place_details";
const DESCRIPTION =
"Get comprehensive details for a specific place using its Google Maps place_id. Use after search_nearby or maps_search_places to get full information including reviews, phone number, website, opening hours, and photos. Returns everything needed to evaluate or contact a business.";

Expand Down
2 changes: 1 addition & 1 deletion src/tools/maps/searchNearby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from "zod";
import { PlacesSearcher } from "../../services/PlacesSearcher.js";
import { getCurrentApiKey } from "../../utils/requestContext.js";

const NAME = "search_nearby";
const NAME = "maps_search_nearby";
const DESCRIPTION =
"Find places near a specific location by type (e.g., restaurants, cafes, hotels). Use when the user wants to discover what's around a given address or coordinates, such as 'find coffee shops near Times Square' or 'what hotels are near the airport'. Supports filtering by place type, search radius, minimum rating, and whether currently open.";

Expand Down
6 changes: 3 additions & 3 deletions tests/smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ async function testListTools(session: McpSession): Promise<void> {

const toolNames = tools.map((t: any) => t.name);
const expectedTools = [
"search_nearby",
"get_place_details",
"maps_search_nearby",
"maps_place_details",
"maps_geocode",
"maps_reverse_geocode",
"maps_distance_matrix",
Expand Down Expand Up @@ -313,7 +313,7 @@ async function testToolCalls(session: McpSession): Promise<void> {

// Test search_nearby (uses Places API New)
const nearbyResult = await sendRequest(session, "tools/call", {
name: "search_nearby",
name: "maps_search_nearby",
arguments: {
center: { value: "35.6586,139.7454", isCoordinates: true },
keyword: "restaurant",
Expand Down
Loading