Skip to main content
Glama

get_top_champions_tool

Retrieve a player's top champion masteries by their game name and tag line. Returns a list of most-played champions sorted by mastery points.

Instructions

🔝 Get the player's top champion masteries.

Returns a list of the player's most-played champions based on mastery points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_nameYes
tag_lineYes
languageNoen_US
countNo

Implementation Reference

  • The main handler for the 'get_top_champions_tool' MCP tool. Resolves the player PUUID, loads the champion name map, and delegates to the helper 'get_top_champions' to fetch and format champion mastery data.
    async def get_top_champions_tool(game_name: str, tag_line: str, language: str = "en_US", count: int = 3) -> str:
        """
        🔝 Get the player's top champion masteries.
    
        Returns a list of the player's most-played champions based on mastery points.
        """
        puuid = await get_puuid(game_name, tag_line)
        if not puuid:
            return "Failed to find player."
    
        champ_map = await get_champion_map(language)
        return await get_top_champions(puuid, champ_map, count)
  • src/server.py:97-97 (registration)
    The @mcp.tool() decorator registers 'get_top_champions_tool' as an MCP tool on the FastMCP instance.
    @mcp.tool()
  • Input schema: accepts game_name (str), tag_line (str), optional language (default 'en_US'), and optional count (default 3). Returns a string.
    async def get_top_champions_tool(game_name: str, tag_line: str, language: str = "en_US", count: int = 3) -> str:
  • Helper function that calls the Riot API champion-mastery endpoint and formats the top champions as a bulleted list string.
    async def get_top_champions(puuid: str, champ_map: dict[int, str], count: int = 3) -> str:
        mastery_data = await riot_request(
            f"/lol/champion-mastery/v4/champion-masteries/by-puuid/{puuid}/top", params={"count": count}
        )
        if not mastery_data:
            return "No champion mastery data found."
    
        return "\n".join(
            f"- {champ_map.get(c['championId'], f'ID({c['championId']})')}: Level {c['championLevel']}, {c['championPoints']} pts"
            for c in mastery_data
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It indicates a read operation returning a list sorted by mastery points, but does not disclose side effects, authentication needs, rate limits, or ordering details. Minimal transparency.

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 only two sentences with no fluff. It is front-loaded with an emoji for visibility. Every word adds value.

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 4 parameters, no output schema, and sibling tools, the description is too minimal. It explains the output but not the parameters, ordering, or limits. Completeness is insufficient for proper agent understanding.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain any parameters beyond the schema titles and defaults. No additional meaning is provided for 'game_name', 'tag_line', 'language', or 'count'. The description fails to compensate for the lack of schema descriptions.

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 tool gets the player's top champion masteries and returns a list of most-played champions based on mastery points. However, it does not differentiate from sibling tool 'get_champion_mastery_tool', which likely focuses on a single champion.

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 context (what the tool returns) but gives no explicit guidance on when to use this tool versus alternatives like 'get_champion_mastery_tool'. No when-not-to-use or prerequisite conditions 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/jifrozen0110/mcp-riot'

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