Skip to main content
Glama
harimkang

Korea Tourism API MCP Server

find_accommodations

Search for hotels, guesthouses, and other lodging options in specific Korean regions using area codes. Get detailed information including location, contact details, and certifications for planning travel accommodations.

Instructions

Find accommodations in Korea by area.

This tool searches for accommodation options (hotels, guesthouses, pensions, etc.) in a specific area in Korea. It provides detailed information about lodging facilities including location, contact information, and special certifications.

Args: area_code (str, optional): Area code. Valid values: - "1" (Seoul) - "2" (Incheon) - "3" (Daejeon) - "4" (Daegu) - "5" (Gwangju) - "6" (Busan) - "7" (Ulsan) - "8" (Sejong) - "31" (Gyeonggi-do) - "32" (Gangwon-do) - "33" (Chungcheongbuk-do) - "34" (Chungcheongnam-do) - "35" (Gyeongsangbuk-do) - "36" (Gyeongsangnam-do) - "37" (Jeonbuk-do) - "38" (Jeollanam-do) - "39" (Jeju-do) sigungu_code (str, optional): Sigungu (district) code within the area language (str, optional): Language for results (default: "en"). Supported: - "en" (English) - "jp" (Japanese) - "zh-cn" (Simplified Chinese) - "zh-tw" (Traditional Chinese) - "de" (German) - "fr" (French) - "es" (Spanish) - "ru" (Russian) page (int, optional): Page number for pagination (default: 1, min: 1) rows (int, optional): Number of items per page (default: 20, max: 100) filter (list[str], optional): List of keys to include in each result item (whitelist). - If filter is None or an empty list ([]), all fields are returned. - If filter contains values, only the specified keys will be included in each item, and all other keys will be removed.

Returns: dict: Accommodation options with structure: { "total_count": int, # Total number of matching items "num_of_rows": int, # Number of items per page "page_no": int, # Current page number "items": [ # List of accommodation items { "title": str, # Name of the accommodation "addr1": str, # Primary address "addr2": str, # Secondary address "areacode": str, # Area code "sigungucode": str, # Sigungu code "contentid": str, # Unique content ID "contenttypeid": str, # Content type ID "createdtime": str, # Creation timestamp "firstimage": str, # URL of main image "firstimage2": str, # URL of thumbnail image "mapx": str, # Longitude "mapy": str, # Latitude "mlevel": str, # Map level "tel": str, # Phone number "cat1": str, # Category 1 code "cat2": str, # Category 2 code "cat3": str, # Category 3 code "hanok": str, # Korean traditional house flag "benikia": str, # Benikia hotel flag "goodstay": str # Goodstay accommodation flag } # ... more items ] }

Example: find_accommodations("1", "1", "en", 1, 20)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
area_codeNo
sigungu_codeNo
languageNo
pageNo
rowsNo
filterNo

Implementation Reference

  • The implementation of the 'find_accommodations' tool handler, which utilizes the KoreaTourismApiClient to fetch data and applies an optional filter to the results.
    async def find_accommodations(
        area_code: str | None = None,
        sigungu_code: str | None = None,
        language: str | None = None,
        page: int = 1,
        rows: int = 20,
        filter: list[str] | None = None,
    ) -> dict:
        """
        Find accommodations in Korea by area.
    
        This tool searches for accommodation options (hotels, guesthouses, pensions, etc.)
        in a specific area in Korea. It provides detailed information about lodging
        facilities including location, contact information, and special certifications.
    
        Args:
            area_code (str, optional): Area code. Valid values:
                - "1" (Seoul)
                - "2" (Incheon)
                - "3" (Daejeon)
                - "4" (Daegu)
                - "5" (Gwangju)
                - "6" (Busan)
                - "7" (Ulsan)
                - "8" (Sejong)
                - "31" (Gyeonggi-do)
                - "32" (Gangwon-do)
                - "33" (Chungcheongbuk-do)
                - "34" (Chungcheongnam-do)
                - "35" (Gyeongsangbuk-do)
                - "36" (Gyeongsangnam-do)
                - "37" (Jeonbuk-do)
                - "38" (Jeollanam-do)
                - "39" (Jeju-do)
            sigungu_code (str, optional): Sigungu (district) code within the area
            language (str, optional): Language for results (default: "en"). Supported:
                - "en" (English)
                - "jp" (Japanese)
                - "zh-cn" (Simplified Chinese)
                - "zh-tw" (Traditional Chinese)
                - "de" (German)
                - "fr" (French)
                - "es" (Spanish)
                - "ru" (Russian)
            page (int, optional): Page number for pagination (default: 1, min: 1)
            rows (int, optional): Number of items per page (default: 20, max: 100)
            filter (list[str], optional): List of keys to include in each result item (whitelist).
                - If filter is None or an empty list ([]), all fields are returned.
                - If filter contains values, only the specified keys will be included in each item, and all other keys will be removed.
    
        Returns:
            dict: Accommodation options with structure:
            {
                "total_count": int,     # Total number of matching items
                "num_of_rows": int,     # Number of items per page
                "page_no": int,         # Current page number
                "items": [              # List of accommodation items
                    {
                        "title": str,           # Name of the accommodation
                        "addr1": str,           # Primary address
                        "addr2": str,           # Secondary address
                        "areacode": str,        # Area code
                        "sigungucode": str,     # Sigungu code
                        "contentid": str,       # Unique content ID
                        "contenttypeid": str,   # Content type ID
                        "createdtime": str,     # Creation timestamp
                        "firstimage": str,      # URL of main image
                        "firstimage2": str,     # URL of thumbnail image
                        "mapx": str,            # Longitude
                        "mapy": str,            # Latitude
                        "mlevel": str,          # Map level
                        "tel": str,             # Phone number
                        "cat1": str,            # Category 1 code
                        "cat2": str,            # Category 2 code
                        "cat3": str,            # Category 3 code
                        "hanok": str,           # Korean traditional house flag
                        "benikia": str,         # Benikia hotel flag
                        "goodstay": str         # Goodstay accommodation flag
                    }
                    # ... more items
                ]
            }
    
        Example:
            find_accommodations("1", "1", "en", 1, 20)
        """
        # Call the API client and return dict directly
        result = await get_api_client().search_stay(
            area_code=area_code,
            sigungu_code=sigungu_code,
            language=language,
            page=page,
            rows=rows,
        )
        if filter:
            filter_items = []
            for item in result.get("items", []):
                item = {k: v for k, v in item.items() if k in filter}
                filter_items.append(item)
            result["items"] = filter_items
        return result
  • Registration of the find_accommodations function as an MCP tool using the @mcp.tool decorator.
    @mcp.tool
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it's a search/read operation (implied by 'searches for'), describes the return structure in detail, explains pagination behavior, and documents the filter parameter's whitelist functionality. However, it doesn't mention rate limits, authentication requirements, or error conditions.

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

Conciseness4/5

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

The description is appropriately structured with purpose statement, parameter documentation, return format, and example. While comprehensive, some sections (like the full area code list) are lengthy but necessary. The information is well-organized and front-loaded with the core purpose.

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

Completeness5/5

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

For a 6-parameter search tool with no annotations and no output schema, the description provides exceptional completeness: it fully documents all parameters, explains the return structure in detail, includes an example, and covers the tool's core functionality. No significant gaps remain for an agent to understand and use this tool effectively.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing comprehensive parameter documentation: it lists all 6 parameters with clear explanations, valid values for area_code and language, default values, constraints (min/max for page/rows), and detailed semantics for the filter parameter including null/empty list behavior.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verb ('searches for') and resource ('accommodation options in Korea'), and distinguishes it from siblings by focusing on lodging facilities rather than attractions, festivals, or general tourism. It specifies the types of accommodations included (hotels, guesthouses, pensions, etc.) and the geographic scope (Korea by area).

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'area in Korea' and listing area codes, but doesn't explicitly state when to use this tool versus alternatives like 'search_tourism_by_keyword' or 'get_tourism_by_area'. It provides no guidance on prerequisites, exclusions, or comparative advantages relative to sibling tools.

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/harimkang/mcp-korea-tourism-api'

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