Skip to main content
Glama

search_places

Search for locations using Google Places Text Search. Enter a query and optional coordinates to find specific places easily with Multi-MCPs integrated APIs.

Instructions

Search places via Google Places Text Search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationNolat,lng (optional)
queryYes

Implementation Reference

  • The main handler function for the 'search_places' tool. It validates the input arguments, checks for API key configuration, and delegates to the GoogleMapsClient's searchPlaces method.
    async search_places(args: Record<string, unknown>) { if (!cfg.googleApiKey) throw new Error("GOOGLE_API_KEY is not configured"); const query = String(args.query || ""); const location = args.location ? String(args.location) : undefined; if (!query) throw new Error("query is required"); return client.searchPlaces(query, location); },
  • Registration of the 'search_places' tool within the tools array returned by registerGoogleMaps(), including name, description, and input schema.
    { name: "search_places", description: "Search places via Google Places Text Search", inputSchema: { type: "object", properties: { query: { type: "string" }, location: { type: "string", description: "lat,lng (optional)" }, }, required: ["query"], }, },
  • Input schema definition for the 'search_places' tool, specifying required 'query' and optional 'location' parameters.
    inputSchema: { type: "object", properties: { query: { type: "string" }, location: { type: "string", description: "lat,lng (optional)" }, }, required: ["query"], },
  • Helper method on GoogleMapsClient class that makes the actual API request to Google Places Text Search endpoint.
    searchPlaces(query: string, location?: string) { return this.request("/maps/api/place/textsearch/json", { query: { query, location, key: this.apiKey }, }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TaylorChen/muti-mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server