Skip to main content
Glama

maps_around_search

Search for nearby points of interest using keywords and coordinates within a specified radius on Gaode Maps.

Instructions

周边搜,根据用户传入关键词以及坐标location,搜索出radius半径范围的POI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYes
radiusNo1000
keywordsNo

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the maps_around_search tool by querying the Amap place/around API for POIs near a location within a specified radius and keywords.
    @mcp.tool() def maps_around_search(location: str, radius: str = "1000", keywords: str = "") -> Dict[str, Any]: """周边搜,根据用户传入关键词以及坐标location,搜索出radius半径范围的POI""" try: response = requests.get( "https://restapi.amap.com/v3/place/around", params={ "key": AMAP_MAPS_API_KEY, "location": location, "radius": radius, "keywords": keywords } ) response.raise_for_status() data = response.json() if data["status"] != "1": return {"error": f"Around Search failed: {data.get('info') or data.get('infocode')}"} pois = [] for poi in data.get("pois", []): pois.append({ "id": poi.get("id"), "name": poi.get("name"), "address": poi.get("address"), "typecode": poi.get("typecode") }) return {"pois": pois} except requests.exceptions.RequestException as e: return {"error": f"Request failed: {str(e)}"}

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/sugarforever/amap-mcp-server'

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