Skip to main content
Glama

get_player_win_loss

Retrieve win/loss statistics for a Dota 2 player using their Steam32 account ID to analyze performance metrics.

Instructions

Get win/loss statistics for a player.

Args:
    account_id: Steam32 account ID of the player

Returns:
    Win/loss record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the get_player_win_loss tool. It fetches win/loss records from the OpenDota API endpoint `/players/{account_id}/wl` and formats the response.
    @mcp.tool()
    async def get_player_win_loss(account_id: int) -> str:
        """Get win/loss statistics for a player.
    
        Args:
            account_id: Steam32 account ID of the player
    
        Returns:
            Win/loss record
        """
        wl_data = await make_opendota_request(f"players/{account_id}/wl")
    
        if "error" in wl_data:
            return f"Error retrieving win/loss data: {wl_data['error']}"
    
        wins = wl_data.get("win", 0)
        losses = wl_data.get("lose", 0)
        total = wins + losses
        win_rate = (wins / total * 100) if total > 0 else 0
    
        return (
            f"Win/Loss Record for Player ID {account_id}:\n"
            f"Wins: {wins}\n"
            f"Losses: {losses}\n"
            f"Total Games: {total}\n"
            f"Win Rate: {win_rate:.2f}%"
        )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves statistics, implying a read-only operation, but doesn't cover important aspects like rate limits, authentication needs, error handling, or data freshness. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by brief sections for arguments and returns. Every sentence earns its place without redundancy, making it efficient and easy to scan.

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 the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but lacks depth. It covers the basic purpose and parameter semantics but misses behavioral details and usage guidelines, leaving room for improvement in guiding the agent effectively.

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 description adds meaningful context for the single parameter 'account_id' by specifying it as the 'Steam32 account ID of the player,' which clarifies its purpose beyond the schema's basic 'integer' type. With 0% schema description coverage, this compensates well, though it doesn't detail format constraints like valid ranges.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get win/loss statistics for a player.' It specifies the verb ('Get') and resource ('win/loss statistics'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from siblings like 'get_player_totals' or 'get_player_rankings', which might also provide statistical data.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, such as whether it's for specific game modes or time periods. With siblings like 'get_player_totals' and 'get_player_rankings' available, this lack of differentiation leaves usage unclear.

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/asusevski/opendota-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server