Skip to main content
Glama
leadbrain

korean-data-mcp

get_melon_chart

Fetch Melon music chart data for real-time, hot100, daily, or weekly rankings. Set the number of songs to retrieve, up to 100.

Instructions

Fetch the Melon music chart (멜론 차트).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chart_typeNoChart to fetch — 'realtime' (실시간), 'hot100', 'daily', or 'weekly'realtime
limitNoNumber of songs to return (default 100, max 100)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_melon_chart' tool. It calls an Apify actor (melon-chart-scraper) with chart_type and limit parameters.
    @mcp.tool()
    async def get_melon_chart(
        chart_type: str = "realtime",
        limit: int = 100,
    ) -> list[dict]:
        """
        Fetch the Melon music chart (멜론 차트).
    
        Args:
            chart_type: Chart to fetch — 'realtime' (실시간), 'hot100', 'daily', or 'weekly'
            limit: Number of songs to return (default 100, max 100)
    
        Returns:
            List of song objects with rank, title, artist, album fields.
        """
        limit = min(limit, 100)
        return await _run_actor(
            f"{APIFY_ACCOUNT}/melon-chart-scraper",
            {"chartType": chart_type, "limit": limit},
        )
  • The function signature defines the schema: chart_type (str, default 'realtime') and limit (int, default 100, max 100). Returns list[dict].
    async def get_melon_chart(
        chart_type: str = "realtime",
        limit: int = 100,
    ) -> list[dict]:
        """
        Fetch the Melon music chart (멜론 차트).
    
        Args:
            chart_type: Chart to fetch — 'realtime' (실시간), 'hot100', 'daily', or 'weekly'
            limit: Number of songs to return (default 100, max 100)
    
        Returns:
            List of song objects with rank, title, artist, album fields.
        """
        limit = min(limit, 100)
        return await _run_actor(
            f"{APIFY_ACCOUNT}/melon-chart-scraper",
            {"chartType": chart_type, "limit": limit},
        )
  • Tool registration via @mcp.tool() decorator on line 90, which registers the function as an MCP tool named 'get_melon_chart'.
    # ---------------------------------------------------------------------------
  • The _run_actor helper function used by get_melon_chart to run the Apify actor and return dataset items.
    async def _run_actor(actor_id: str, input_data: dict, timeout_secs: int = 60) -> list[dict]:
        """Run an Apify actor synchronously and return dataset items."""
        token = _get_token()
        url = f"{APIFY_BASE}/acts/{actor_id}/run-sync-get-dataset-items"
        params = {"token": token}
    
        async with httpx.AsyncClient(timeout=timeout_secs + 10) as client:
            resp = await client.post(url, json=input_data, params=params)
            resp.raise_for_status()
            return resp.json()
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It merely states 'Fetch' without disclosing behavioral traits such as rate limits, authentication requirements, or pagination behavior. The output schema exists but does not compensate for lack of operational context.

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 a single sentence with no wasted words. It is concise and front-loaded with the essential verb and resource, though it could be slightly more informative without losing conciseness.

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

Completeness3/5

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

Given the tool's simplicity (2 optional parameters, output schema exists), the description is minimally adequate but could be improved by mentioning the output format or typical use cases. It does not cover edge cases or error conditions.

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?

Schema description coverage is 100%, so the schema already explains both parameters. The description does not add additional meaning beyond what the schema provides, resulting in a baseline score of 3.

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 uses a clear verb 'Fetch' and specifies the resource 'Melon music chart', which distinguishes it from sibling tools focused on shopping, reviews, and news. However, it does not explicitly differentiate from potential similar chart tools on other servers.

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?

No explicit guidance on when to use this tool versus alternatives. Since sibling tools are from different domains, usage context is implied but not stated. No exclusion criteria or prerequisites are mentioned.

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/leadbrain/korean-data-mcp'

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