Skip to main content
Glama

get_recent_matches_tool

Retrieves recent match history for a League of Legends player using their game name and tag line. Returns match summaries with champion, score, and result.

Instructions

đŸ•šī¸ Get the player's recent match history.

Returns a brief summary of the player's most recent matches, including champion, score, and result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_nameYes
tag_lineYes
countNo

Implementation Reference

  • The MCP tool handler function 'get_recent_matches_tool'. It uses @mcp.tool() decorator (registration), accepts game_name, tag_line, and count parameters, fetches the player's PUUID, then calls the helper get_recent_matches() to retrieve and format recent match history.
    @mcp.tool()
    async def get_recent_matches_tool(game_name: str, tag_line: str, count: int = 3) -> str:
        """
        đŸ•šī¸ Get the player's recent match history.
    
        Returns a brief summary of the player's most recent matches, including champion, score, and result.
        """
        puuid = await get_puuid(game_name, tag_line)
        if not puuid:
            return "Failed to find player."
        return await get_recent_matches(puuid, count)
  • Helper function 'get_recent_matches' that executes the actual Riot API calls. It fetches match IDs by PUUID, retrieves each match, extracts participant data (champion, KDA, win/loss), and returns formatted strings.
    async def get_recent_matches(puuid: str, count: int = 3) -> str:
        match_ids = await riot_request(
            f"/lol/match/v5/matches/by-puuid/{puuid}/ids", region="asia", params={"count": count}
        )
        if not match_ids:
            return "No recent matches found."
    
        matches = []
        for match_id in match_ids:
            match = await riot_request(f"/lol/match/v5/matches/{match_id}", region="asia")
            if match:
                participant = next((p for p in match["info"]["participants"] if p["puuid"] == puuid), None)
                if participant:
                    champ = participant["championName"]
                    k, d, a = participant["kills"], participant["deaths"], participant["assists"]
                    result = "Win" if participant["win"] else "Loss"
                    matches.append(f"{match_id} {champ}: {k}/{d}/{a} - {result}")
        return "\n".join(matches)
  • src/server.py:132-133 (registration)
    The tool is registered via the @mcp.tool() decorator on the get_recent_matches_tool function (line 132).
    @mcp.tool()
    async def get_recent_matches_tool(game_name: str, tag_line: str, count: int = 3) -> str:
  • Input schema defined via function signature: game_name (str), tag_line (str), count (int, default 3). The docstring serves as the description.
    async def get_recent_matches_tool(game_name: str, tag_line: str, count: int = 3) -> str:
        """
        đŸ•šī¸ Get the player's recent match history.
Behavior2/5

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

With no annotations, the description should disclose behavioral traits, but it only mentions the output is a 'brief summary'. It omits details like authentication requirements, rate limits, or any side effects (though likely read-only).

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 very concise at two sentences and uses an emoji for visibility. It is efficient but could be better structured by including parameter info.

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 tool has three parameters, no output schema, and no annotations, the description is incomplete. It provides a high-level summary but lacks details on how to invoke it correctly or what the full response looks like.

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 coverage is 0%, meaning the description does not explain any parameters. The tool has three parameters (game_name, tag_line, count) but the description provides no meaning, default, or format for them.

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 recent match history and specifies the returned data (champion, score, result), distinguishing it from siblings like get_champion_mastery_tool or get_match_summary.

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?

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or exclusions. The description only states what it does, not when it is appropriate.

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