Skip to main content
Glama
harimkang

Korea Tourism API MCP Server

get_area_codes

Retrieve area codes for Korean regions to identify provinces, cities, and districts for tourism planning. Supports multiple languages and hierarchical navigation.

Instructions

Get area codes for regions in Korea.

This tool retrieves area codes and their corresponding names for Korean regions. It can be used to get top-level area codes (provinces/cities) or sub-area codes (districts/counties) within a specific area.

Args: parent_area_code (str, optional): Parent area code to get sub-areas - If None: Returns top-level area codes (provinces/cities) - If provided: Returns sigungu codes for that 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: 100, max: 100)

Returns: dict: Area codes with structure: { "total_count": int, # Total number of matching items "parent_area_code": str, # Parent area code used (or null) "items": [ # List of area code items { "code": str, # Area code value "name": str, # Area name "rnum": str # Row number } # ... more items ] }

Available area codes: - "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)

Example: get_area_codes(None, "en", 1, 50) # Get top-level areas get_area_codes("1", "en", 1, 50) # Get districts in Seoul

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_area_codeNo
languageNo
pageNo
rowsNo

Implementation Reference

  • The `get_area_codes` tool is registered using the `@mcp.tool` decorator and implemented as an asynchronous function. It retrieves area codes from the `KoreaTourismApiClient` and formats the response.
    @mcp.tool
    async def get_area_codes(
        parent_area_code: str | None = None,
        language: str | None = None,
        page: int = 1,
        rows: int = 100,
    ) -> dict:
        """
        Get area codes for regions in Korea.
    
        This tool retrieves area codes and their corresponding names for Korean regions.
        It can be used to get top-level area codes (provinces/cities) or sub-area codes
        (districts/counties) within a specific area.
    
        Args:
            parent_area_code (str, optional): Parent area code to get sub-areas
                - If None: Returns top-level area codes (provinces/cities)
                - If provided: Returns sigungu codes for that 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: 100, max: 100)
    
        Returns:
            dict: Area codes with structure:
            {
                "total_count": int,     # Total number of matching items
                "parent_area_code": str, # Parent area code used (or null)
                "items": [              # List of area code items
                    {
                        "code": str,            # Area code value
                        "name": str,            # Area name
                        "rnum": str             # Row number
                    }
                    # ... more items
                ]
            }
    
        Available area codes:
            - "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)
    
        Example:
            get_area_codes(None, "en", 1, 50)  # Get top-level areas
            get_area_codes("1", "en", 1, 50)   # Get districts in Seoul
        """
        # Call the API client and return dict directly
        results = await get_api_client().get_area_code_list(
            area_code=parent_area_code, language=language, page=page, rows=rows
        )
        # Add parent_area_code to the results
        return {**results, "parent_area_code": parent_area_code}
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it describes the return structure in detail, explains pagination behavior (page and rows parameters), lists supported languages, and provides example area codes. It does not mention rate limits, authentication needs, or error handling, but covers most operational aspects adequately.

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 well-structured with clear sections (purpose, args, returns, examples) and front-loaded key information. It is appropriately sized but includes a lengthy list of area codes that could be trimmed or referenced externally. Most sentences earn their place by adding value.

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?

Given the complexity (4 parameters, no annotations, no output schema), the description is highly complete. It explains the tool's purpose, parameter semantics, return structure, and provides examples. The lack of output schema is compensated by the detailed Returns section, making it sufficient for an agent to use the tool correctly.

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?

The schema description coverage is 0%, so the description must fully compensate. It does so excellently: each parameter (parent_area_code, language, page, rows) is explained with semantics, default values, constraints (e.g., min:1, max:100), and examples. The description adds comprehensive meaning beyond the bare schema.

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 retrieves area codes and their corresponding names for Korean regions, specifying both top-level (provinces/cities) and sub-level (districts/counties) retrieval. It uses specific verbs ('retrieves', 'get') and distinguishes the resource (Korean area codes) from sibling tools like find_accommodations or search_festivals_by_date.

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

Usage Guidelines4/5

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

The description provides clear context on when to use the tool: to get area codes for Korean regions, with examples for top-level and sub-area retrieval. It explains the effect of the parent_area_code parameter (None vs. provided). However, it does not explicitly state when not to use it or mention alternatives among 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