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

localSearch

Search for places on Naver Maps using specific queries, display up to 5 results, and sort by correctness or review count for Korean locations.

Instructions

Searches for places registered with Naver's local service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
displayNonumber of search results to display in response
queryYesquery used for search
sortNosorting method. random: sorted by correctness. comment: sorted by a number of reviews (descending)random

Implementation Reference

  • The MCP tool handler for 'localSearch', including registration via @mcp.tool decorator, input schema via Pydantic Fields, and logic delegating to NaverMapsClient.
    @mcp.tool(description="Searches for places registered with Naver's local service.") async def localSearch( query: str = Field(description="query used for search", min_length=1), display: int = Field( 5, description="number of search results to display in response", ge=0, le=5 ), sort: Literal["random", "comment"] = Field( "random", description="sorting method. random: sorted by correctness. comment: sorted by a number of reviews (descending)", ), ) -> LocalSearchResponse | Dict: """ Returns: LocalSearchResponse: An object containing places registered with Naver's local service. """ try: return await naver_maps_client.searchForLocalInformation(query, display, sort) except Exception as ex: return {"success": False, "error": str(ex)}
  • Pydantic BaseModel defining the structure of the LocalSearchResponse output.
    class LocalSearchResponse(BaseModel): total: int = Field(description="Total number of results") start: int = Field(description="Starting index of results") display: int = Field(description="Number of results displayed in the response") items: List[LocalItem] = Field(description="List of search result items")
  • Client helper method that makes the HTTP request to Naver's local search API and returns parsed LocalSearchResponse.
    async def searchForLocalInformation( self, query: str, display: int = 5, sort: Literal["random", "comment"] = "random" ) -> LocalSearchResponse: """ https://developers.naver.com/docs/serviceapi/search/local/local.md#%EC%A7%80%EC%97%AD """ path = f"{self.SEARCH_BASE_URL}/local.json" params = { "query": query, "display": display, "sort": sort, } response_json = await self._get(path, self.naver_headers, params) return LocalSearchResponse(**response_json)
  • Pydantic BaseModel for individual items in LocalSearchResponse.
    class LocalItem(BaseModel): title: str = Field(description="Name of the place") link: str = Field(description="URL of the place") category: str = Field(description="Category of the place") description: str = Field(description="Brief description of the place") address: str = Field(description="Land-lot address") roadAddress: str = Field(description="Street address")

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-naver-maps'

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