Skip to main content
Glama

get_game_stats

Retrieve essential game data from the League of Legends client API using this MCP server tool. Access basic game statistics for real-time in-game insights and analysis.

Instructions

Basic data about the game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:189-195 (handler)
    The main handler function for the 'get_game_stats' tool. It creates an HTTP client to the LoL client, fetches the gamestats endpoint, and returns the JSON response.
    async def get_game_stats() -> dict: """ Basic data about the game. """ async with get_lol_client() as client: response = await client.get("/liveclientdata/gamestats") return response.json()
  • main.py:187-187 (registration)
    The @mcp.tool() decorator registers the get_game_stats function as an MCP tool.
    @mcp.tool()
  • main.py:50-58 (helper)
    Helper utility function used by get_game_stats (and other tools) to create an authenticated HTTP client for the League of Legends live client API.
    def get_lol_client(): """ Create an HTTP client for the League of Legends client. """ return httpx.AsyncClient( base_url=LOL_CLIENT_HOST, verify="./certs/riotgames.pem", timeout=DEFAULT_TIMEOUT )
  • main.py:188-188 (registration)
    The @with_timeout decorator applied to the tool handler, likely adding timeout functionality.
    @with_timeout

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/johnnyinlee/lol-client-mcp'

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