Skip to main content
Glama

get_pro_matches

Retrieve recent professional Dota 2 matches to analyze competitive gameplay trends and strategies.

Instructions

Get recent professional matches.

Args:
    limit: Number of matches to retrieve (default: 5)

Returns:
    List of recent professional matches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'get_pro_matches' tool. Decorated with @mcp.tool() for registration. It retrieves recent professional Dota 2 matches from the OpenDota API, applies a limit, handles errors, formats match details (ID, teams, league, date, duration, score, winner), and returns a formatted string summary.
    @mcp.tool()
    async def get_pro_matches(limit: int = 5) -> str:
        """Get recent professional matches.
    
        Args:
            limit: Number of matches to retrieve (default: 5)
    
        Returns:
            List of recent professional matches
        """
        if limit > 20:
            limit = 20  # Cap for reasonable response size
    
        pro_matches = await make_opendota_request("proMatches")
    
        if "error" in pro_matches:
            return f"Error retrieving pro matches: {pro_matches['error']}"
    
        if not pro_matches or not isinstance(pro_matches, list) or len(pro_matches) == 0:
            return "No professional matches found."
    
        formatted_matches = []
    
        # Limit the matches to display
        matches_to_show = []
        if isinstance(pro_matches, list):
            matches_to_show = pro_matches[:limit]
        for i, match in enumerate(matches_to_show):
            match_id = match.get("match_id", "Unknown")
            radiant_name = match.get("radiant_name", "Radiant")
            dire_name = match.get("dire_name", "Dire")
            league_name = match.get("league_name", "Unknown League")
            duration = format_duration(match.get("duration", 0))
            start_time = format_timestamp(match.get("start_time", 0))
            radiant_score = match.get("radiant_score", 0)
            dire_score = match.get("dire_score", 0)
            winner = radiant_name if match.get("radiant_win", False) else dire_name
    
            formatted_matches.append(
                f"{i+1}. {radiant_name} vs {dire_name}\n"
                f"   Match ID: {match_id}\n"
                f"   League: {league_name}\n"
                f"   Date: {start_time}\n"
                f"   Duration: {duration}\n"
                f"   Score: {radiant_score} - {dire_score}\n"
                f"   Winner: {winner}"
            )
    
        return "Recent Professional Matches:\n\n" + "\n\n".join(formatted_matches)
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 mentions the tool retrieves data ('Get'), implying a read-only operation, but doesn't specify any behavioral traits like rate limits, authentication needs, or data freshness. The description lacks details on what 'recent' means or any constraints beyond the limit parameter.

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 well-structured and concise, with a clear purpose statement followed by brief sections for Args and Returns. Every sentence earns its place, and there is no unnecessary information, making it easy to parse quickly.

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 (one optional parameter) and the presence of an output schema (which handles return values), the description is adequate but has gaps. It covers the basic purpose and parameter semantics but lacks usage guidelines and behavioral details, making it minimally viable but not fully comprehensive for an agent.

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: it explains that 'limit' is the 'Number of matches to retrieve' and provides a default value (5). Since schema description coverage is 0%, the description compensates by clarifying the parameter's purpose, which is valuable beyond the basic schema type information.

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 recent professional matches.' This specifies the verb ('Get') and resource ('recent professional matches'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from siblings like 'get_public_matches' or 'get_match_data', which might also retrieve match-related 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 any prerequisites, exclusions, or comparisons to sibling tools such as 'get_public_matches' or 'get_match_data', leaving the agent to infer usage based on the name alone.

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