Skip to main content
Glama
johnnyinlee

lol-client-mcp Public

get_all_game_data

Retrieve comprehensive in-game data from the League of Legends client for testing and analysis purposes. This tool accesses all available game information through the Live Client Data API.

Instructions

The Live League of Legends Client Data API has a number of endpoints that return a subset of the data returned by the /allgamedata endpoint. This endpoint is great for testing the Live Client Data API, but unless you actually need all the data from this endpoint, use one of the endpoints listed below that return a subset of the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:62-74 (handler)
    The handler function implementing the 'get_all_game_data' tool. It is decorated with @mcp.tool() for registration and @with_timeout for error handling. Fetches all game data from the LoL live client API endpoint.
    @mcp.tool()
    @with_timeout
    async def get_all_game_data() -> dict:
        """
        The Live League of Legends Client Data API has a number of endpoints
        that return a subset of the data returned by the /allgamedata endpoint.
        This endpoint is great for testing the Live Client Data API,
        but unless you actually need all the data from this endpoint,
        use one of the endpoints listed below that return a subset of the response.
        """
        async with get_lol_client() as client:
            response = await client.get("/liveclientdata/allgamedata")
            return response.json()
  • main.py:62-62 (registration)
    Decorator registering the get_all_game_data function as an MCP tool.
    @mcp.tool()
  • main.py:18-47 (helper)
    Helper decorator applied to the handler for timeout and error handling.
    def with_timeout(func: Callable[..., Awaitable[T]]) -> Callable[..., Awaitable[T]]:
        """
        Decorator to handle timeout exceptions for async functions.
        """
        @functools.wraps(func)
        async def wrapper(*args: Any, **kwargs: Any) -> T:
            try:
                return await func(*args, **kwargs)
            except httpx.TimeoutException:
                return {
                    "error": "Game has not started or connection failed.",
                    "code": "TIMEOUT"
                }
            except httpx.ConnectError:
                return {
                    "error": "Cannot connect to the game client. Please check if the game is running.",
                    "code": "CONNECTION_ERROR"
                }
            except httpx.HTTPStatusError as e:
                return {
                    "error": f"Server error: HTTP {e.response.status_code}",
                    "code": "HTTP_ERROR",
                    "status": e.response.status_code
                }
            except Exception as e:
                return {
                    "error": f"An error occurred: {str(e)}",
                    "code": "UNKNOWN_ERROR"
                }
        return wrapper
  • main.py:50-58 (helper)
    Helper function used by the handler to create the HTTP client for the LoL API.
    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
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the tool is 'great for testing' which hints at a read-only, non-destructive operation, but doesn't explicitly state this or describe rate limits, authentication needs, or what 'all the data' entails. The behavioral disclosure is incomplete for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences that each add value: explaining the endpoint's scope, its testing utility, and when to use alternatives. It's front-loaded with the core purpose, though slightly verbose in phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 0 parameters, the description provides good usage guidance but lacks details on what data is returned, format, or behavioral traits. It's minimally adequate for a zero-parameter tool but could better explain the 'all data' scope and testing context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter semantics, and it doesn't introduce any confusion about parameters. Baseline 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explains this endpoint returns 'all the data' from the Live League of Legends Client Data API and mentions it's useful for testing, but doesn't specify what 'all the data' actually contains or what specific resources it retrieves. It distinguishes from siblings by noting they return subsets, but the core purpose remains somewhat vague.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when NOT to use this tool ('unless you actually need all the data') and directs users to alternative endpoints ('use one of the endpoints listed below that return a subset'). This provides clear guidance on when to choose this tool versus its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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