Skip to main content
Glama

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
NameRequiredDescriptionDefault

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

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