Skip to main content
Glama
yunkee-lee

MCP Kakao Local

by yunkee-lee

search_by_category

Find nearby places by category within a specified radius from a central location using Kakao Local API. Filter results for restaurants, cafes, hospitals, schools, parking lots, and other location types in Korea.

Instructions

Searches for places with matching category group code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
category_group_codeYescategory used to search for places (CategoryGroupCode resource)
center_coordinateYeslongitude and latitude of a center
radius_from_centerYessearch radius from the center in meters
pageNopage number of result

Implementation Reference

  • MCP tool handler and registration for 'search_by_category'. Includes input schema via Pydantic Fields (category_group_code, center_coordinate, radius_from_center, page) and executes by calling the client helper, with error handling.
    @mcp.tool(description="Searches for places with matching category group code")
    async def search_by_category(
      category_group_code: CategoryGroupCode = Field(
        description="category used to search for places (CategoryGroupCode resource)"
      ),
      center_coordinate: Coordinate = Field(description="longitude and latitude of a center"),
      radius_from_center: int = Field(description="search radius from the center in meters", gt=0),
      page: int = Field(1, description="page number of result", ge=1),
    ) -> LocationSearchResponse:
      """
      Returns:
        LocationSearchResponse: An object containing metadata and a list of places.
      """
      try:
        return await kakao_local_client.search_by_category(
          category_group_code,
          center_coordinate,
          radius_from_center,
          page=page,
        )
      except Exception as ex:
        return {"success": False, "error": str(ex)}
  • Core helper function in KakaoLocalClient that performs the actual API call to Kakao's /search/category endpoint using httpx, constructs parameters, and parses response into LocationSearchResponse model.
    async def search_by_category(
      self,
      category_group_code: CategoryGroupCode,
      center: Coordinate,
      radius: int,
      page: int = 1,
      size: int = 10,
      sort_option: LocationSortOption = LocationSortOption.ACCURACY,
    ) -> LocationSearchResponse:
      """https://developers.kakao.com/docs/latest/ko/local/dev-guide#search-by-category"""
      path = f"{self.BASE_URL}/search/category"
      params = {
        "category_group_code": category_group_code.name,
        "x": center.longitude,
        "y": center.latitude,
        "radius": radius,
        "page": page,
        "size": size,
        "sort": sort_option.value,
      }
      response_json = await self._get(path, params)
      return LocationSearchResponse(**response_json)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the search action without detailing aspects like whether it's read-only, if it requires authentication, rate limits, pagination behavior, or what the output looks like. This leaves significant gaps for an agent to understand how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with 4 parameters and no output schema or annotations, the description is insufficient. It doesn't explain the return format, error handling, or behavioral traits, leaving the agent with incomplete information to use the tool effectively in context with its siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional meaning beyond what the schema provides, such as explaining how parameters interact or providing usage examples. However, since the schema is comprehensive, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('searches for') and resource ('places') with a specific criterion ('matching category group code'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_by_keyword' or 'find_coordinates', which might have overlapping use cases, so it doesn't reach a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_by_keyword' or 'find_coordinates'. It lacks context about prerequisites, such as needing a center coordinate and radius, and doesn't mention any exclusions or specific scenarios where this tool is preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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-kakao-local'

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