get_active_player
Retrieve comprehensive data about the active player in League of Legends using the MCP server for real-time in-game insights and client information.
Instructions
Get all data about the active player.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:77-86 (handler)The handler function implementing the 'get_active_player' tool. It fetches active player data from the LoL client API endpoint '/liveclientdata/activeplayer' using an async HTTP client, with timeout and error handling via the @with_timeout decorator.@mcp.tool() @with_timeout async def get_active_player() -> dict: """ Get all data about the active player. """ async with get_lol_client() as client: response = await client.get("/liveclientdata/activeplayer") return response.json()
- main.py:77-77 (registration)The @mcp.tool() decorator registers the get_active_player function as an MCP tool.@mcp.tool()
- main.py:79-82 (schema)Function signature with return type annotation 'dict' and docstring describing the tool's purpose and output.async def get_active_player() -> dict: """ Get all data about the active player. """
- main.py:78-78 (helper)The @with_timeout decorator applied to the handler, providing timeout and error handling for the API call.@with_timeout