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

geocode

Convert addresses into precise location data using Naver Maps. Ideal for finding accurate geocoordinates in Korea, supporting both Korean and English languages.

Instructions

Searches for address information related to the entered address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesaddress to search for
languageNolanguage used in responsekor

Implementation Reference

  • MCP tool handler and registration for the 'geocode' tool. Defines input schema with Pydantic Fields and delegates execution to NaverMapsClient.
    @mcp.tool(description="Searches for address information related to the entered address.") async def geocode( address: str = Field(description="address to search for", min_length=1), language: Literal["kor", "eng"] = Field("kor", description="language used in response"), ) -> GeocodeResponse | Dict: """ Returns: GeocodeResponse: An object containing metadata and a list of matching addresses """ try: return await naver_maps_client.geocode(address, language) except Exception as ex: return {"success": False, "error": str(ex)}
  • Pydantic model defining the output schema for the geocode tool response.
    class GeocodeResponse(BaseModel): status: str = Field(description="Status of the request") meta: Meta = Field(description="Metadata of the response") addresses: List[Address] = Field(description="List of matching addresses") errorMessage: str = Field(description="Error message (only present for HTTP 500 errors)")
  • Helper function in NaverMapsClient that performs the actual HTTP request to Naver's geocoding API and parses the response.
    async def geocode( self, query: str, language: str, page: int = 1, count: int = 10, ) -> GeocodeResponse: """ https://api.ncloud-docs.com/docs/application-maps-geocoding """ path = f"{self.MAP_BASE_URL}/map-geocode/v2/geocode" params = { "query": query, "language": language, "page": page, "count": count, } response_json = await self._get(path, self.naver_maps_headers, params) return GeocodeResponse(**response_json)

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