get_player_list
Retrieve a list of game heroes and their stats from the League of Legends client to access current player data.
Instructions
Retrieve the list of heroes in the game and their stats.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:123-130 (handler)The core handler function for the 'get_player_list' tool. It makes an HTTP GET request to the League of Legends live client API at '/liveclientdata/playerlist' and returns the JSON response as a list of dictionaries containing player stats.async def get_player_list() -> list[dict]: """ Retrieve the list of heroes in the game and their stats. """ async with get_lol_client() as client: response = await client.get("/liveclientdata/playerlist") return response.json()
- main.py:121-121 (registration)Registers the get_player_list function as an MCP tool using the FastMCP decorator. The tool name is inferred from the function name.@mcp.tool()
- main.py:122-122 (helper)Applies the with_timeout decorator to handle timeouts and errors in the HTTP requests made by the tool.@with_timeout