Skip to main content
Glama

get_event_data

Retrieve real-time game event data from the League of Legends client to monitor in-game occurrences and track match progress.

Instructions

Get a list of events that have occurred in the game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:178-184 (handler)
    The main handler function for the 'get_event_data' tool. It fetches event data from the League of Legends live client API endpoint '/liveclientdata/eventdata' using an HTTP client with timeout handling.
    async def get_event_data() -> dict: """ Get a list of events that have occurred in the game. """ async with get_lol_client() as client: response = await client.get("/liveclientdata/eventdata") return response.json()
  • main.py:176-176 (registration)
    The @mcp.tool() decorator registers the get_event_data function as an MCP tool in the FastMCP server.
    @mcp.tool()
  • Applies the with_timeout decorator to handle various HTTP errors and timeouts for the tool.
    @with_timeout
  • main.py:50-58 (helper)
    Helper function to create the HTTP client configured for the LoL client API, used by get_event_data.
    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 )

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