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

localSearch

Search for Korean locations and businesses using Naver's local service. Find places with customizable sorting and result display options.

Instructions

Searches for places registered with Naver's local service.

Input Schema

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

Implementation Reference

  • MCP tool handler and registration for 'localSearch'. Includes input schema via Pydantic Fields, executes by calling NaverMapsClient helper, and handles errors.
    @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 model defining the output schema for localSearch results.
    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")
  • Helper function in NaverMapsClient that performs the actual API call to Naver's local search endpoint and parses the response into 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 model for individual items in the 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")
Install Server

Other 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