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

find_coordinates

Locate geographical coordinates using an address with the MCP Kakao Local server. Input an address to retrieve precise latitude and longitude data for mapping purposes.

Instructions

Find coordinates of a given address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesaddress to search for
pageNopage number of result

Implementation Reference

  • MCP tool handler function for 'find_coordinates'. It defines the input schema using Pydantic Field, calls the KakaoLocalClient helper, handles errors, and returns AddressResponse or an error dictionary. The @mcp.tool decorator registers it.
    @mcp.tool(description="Find coordinates of a given address") async def find_coordinates( address: str = Field(description="address to search for", min_length=1), page: int = Field(1, description="page number of result", ge=1), ) -> AddressResponse: """ Returns: AddressResponse: An object containing metadata and a list of addresses """ try: response = await kakao_local_client.find_coordinates(address, page=page) if len(response.documents) == 0: return {"success": False, "error": "No coordinates found. Check if the address is correct."} return response except Exception as ex: return {"success": False, "error": str(ex)}
  • Low-level helper in KakaoLocalClient that makes the HTTP GET request to Kakao Local API endpoint for address-to-coordinate conversion and parses the response into AddressResponse.
    async def find_coordinates(self, address: str, page: int = 1, size: int = 10) -> AddressResponse: """https://developers.kakao.com/docs/latest/ko/local/dev-guide#address-coord""" path = f"{self.BASE_URL}/search/address" params = { "query": address, "page": page, "size": size, } response_json = await self._get(path, params) return AddressResponse(**response_json)
  • Pydantic schema/model for the output of find_coordinates tool, defining the structure of the response with metadata and list of address documents containing coordinates.
    class AddressResponse(BaseModel): meta: Meta = Field(description="Response metadata") documents: list[AddressDocument] = Field(description="List of addresses")
  • Pydantic schema for individual address documents in the find_coordinates response, including address details and x/y coordinates.
    class AddressDocument(BaseModel): address_name: str = Field(description="street address or land-lot address (지번 주소)") address_type: Literal["REGION", "ROAD", "REGION_ADDR", "ROAD_ADDR"] = Field( description="type of address" ) x: str = Field(description="longitude") y: str = Field(description="latitude") address: dict = Field(description="details of land-lot address (지번 주소)") road_address: dict = Field(description="details of street address")
  • Pydantic schema for metadata in responses, including pagination info used in find_coordinates output.
    class Meta(BaseModel): total_count: int = Field(description="Number of documents found for the search results", ge=0) pageable_count: int = Field(description="Number of documents allowed in a page", ge=0, le=45) is_end: bool = Field( description="Whether the current page is the last page. If false, increase the page value in the next request to fetch the next page" ) same_name: SameName | None = Field( None, description="Region and keyword analysis information of the query" )

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