Skip to main content
Glama
yunkee-lee
by yunkee-lee

get_place

Retrieve detailed information about a place, including name, address, reviews, and photos, by providing its unique ID from Kakao Local API. Ideal for integrating location-based data in Korea.

Instructions

Fetches details for a place such as name, address, reviews, photos and etc

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
place_idYesID of a place, which is document ID in location search results

Implementation Reference

  • The MCP tool handler function for 'get_place'. It defines the input schema via Pydantic Field, registers the tool with @mcp.tool, executes by calling the client helper, and handles exceptions.
    @mcp.tool(description="Fetches details for a place such as name, address, reviews, photos and etc") async def get_place( place_id: int = Field( description="ID of a place, which is document ID in location search results", ge=1 ), ) -> dict: """ Returns: PlaceDetailResponse: An object containing details of the place """ try: return await kakao_local_client.get_place_details(place_id) except Exception as ex: return {"success": False, "error": str(ex)}
  • The supporting helper method in KakaoLocalClient that performs the actual HTTP request to fetch place details from Kakao's unofficial place API endpoint.
    async def get_place_details(self, place_id: int) -> PlaceDetailResponse: headers = { "Accept": "application/json, text/plain, */*", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9", "Connection": "keep-alive", "Dnt": "1", "Origin": "https://place.map.kakao.com", "Referer": "https://place.map.kakao.com/", "Pf": "web", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36", } async with httpx.AsyncClient(headers=headers, http2=True) as client: response = await client.get(f"https://place-api.map.kakao.com/places/panel3/{place_id}") try: response_json = response.raise_for_status().json() return PlaceDetailResponse(**response_json) except httpx.HTTPError as exc: self._handle_response_status(response.status_code, exc)
  • Pydantic BaseModel defining the structure and validation for the PlaceDetailResponse returned by the get_place tool.
    class PlaceDetailResponse(BaseModel): menu: dict = Field({}, description="Menus if the place has menus") summary: PlaceSummary = Field(description="Summary of the place") business_hours: dict = Field(description="Details of business hours") photos: dict = Field(description="Contains counts (metadata) and photos of the place") blog_review: dict = Field(description="Review of the place in blogs") kakaomap_review: dict = Field(description="Review of the place on Kakap Map (optional)") find_way: dict = Field(description="Transit information nearby the place") place_add_info: dict = Field(description="Additional information of the place")

Other Tools

Related Tools

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/yunkee-lee/mcp-kakao-local'

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