Skip to main content
Glama
jikime

Naver Search MCP Server

search_local

Find local businesses using keywords, with options to sort results by random or comment count and control display parameters.

Instructions

Searches for local business information using the given keyword. (display maximum 5, start maximum 1) sort='random'/'comment' is supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
displayNo
pageNo
sortNorandom

Implementation Reference

  • The handler function that implements the core logic of the 'search_local' tool by preparing parameters and calling the shared Naver Local API via _make_api_call.
    async def search_local(query: str, display: int = 5, page: int = 1, sort: str = "random") -> str: """ Searches for local business information using the given keyword. (display maximum 5, start maximum 1) sort='random'/'comment' is supported. Args: query (str): The keyword to search for display (int, optional): The number of results to display. Default is 5. page (int, optional): The starting page number. Default is 1. sort (str, optional): The sorting criteria. Default is "random" (random). """ display = min(display, 5) # API 제약 조건 적용 start = 1 # 지역 API는 항상 start=1 params = {"query": query, "display": display, "start": start, "sort": sort} return await _make_api_call("local.json", params, LocalResult, "Local")
  • server.py:494-497 (registration)
    The @mcp.tool decorator that registers the 'search_local' tool with MCP, specifying its name and description.
    @mcp.tool( name="search_local", description="Searches for local business information using the given keyword. (display maximum 5, start maximum 1) sort='random'/'comment' is supported." )
  • Pydantic schema/model for individual local search result items, defining fields like category, address, telephone, etc.
    class LocalItem(BaseItem): category: Optional[str] = None description: Optional[str] = None telephone: Optional[str] = None address: Optional[str] = None roadAddress: Optional[str] = None mapx: Optional[str] = None mapy: Optional[str] = None
  • Pydantic schema for the overall Local search result, inheriting from SearchResultBase with items as List[LocalItem].
    class LocalResult(SearchResultBase): items: List[LocalItem]

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/jikime/py-mcp-naver-search'

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