get_active_player_name
Retrieve the name of the active player in League of Legends using this tool. Access in-game data directly from the LOL client MCP server for streamlined player information management.
Instructions
Returns the player name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:88-96 (handler)Implementation of the get_active_player_name tool. This async function, decorated with @mcp.tool() for registration and @with_timeout for handling timeouts and errors, fetches the active player's name from the League of Legends live client data API at /liveclientdata/activeplayername and returns it as a string.@mcp.tool() @with_timeout async def get_active_player_name() -> str: """ Returns the player name. """ async with get_lol_client() as client: response = await client.get("/liveclientdata/activeplayername") return response.text