Skip to main content
Glama

get_team_info

Retrieve detailed statistics and information about Dota 2 teams using their unique team ID to access performance data, roster details, and match history.

Instructions

Get information about a team.

Args:
    team_id: Team ID

Returns:
    Team information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The complete handler function for the 'get_team_info' MCP tool. It is registered via the @mcp.tool() decorator, fetches team details and current players from the OpenDota API using make_opendota_request, processes the data, and returns a formatted string summary of the team information including rating, win/loss record, last match time, and current players.
    @mcp.tool()
    async def get_team_info(team_id: int) -> str:
        """Get information about a team.
    
        Args:
            team_id: Team ID
    
        Returns:
            Team information
        """
        team_data = await make_opendota_request(f"teams/{team_id}")
    
        if "error" in team_data:
            return f"Error retrieving team data: {team_data['error']}"
    
        if not team_data or not isinstance(team_data, dict):
            return f"No data found for team ID {team_id}."
    
        team_name = team_data.get("name", "Unknown")
        team_tag = team_data.get("tag", "")
        rating = team_data.get("rating", 0)
        wins = team_data.get("wins", 0)
        losses = team_data.get("losses", 0)
        total_games = wins + losses
        win_rate = (wins / total_games * 100) if total_games > 0 else 0
        last_match_time = format_timestamp(team_data.get("last_match_time", 0))
    
        # Get team players
        players_data = await make_opendota_request(f"teams/{team_id}/players")
    
        formatted_players = []
        if isinstance(players_data, list) and players_data:
            current_players = [p for p in players_data if p.get("is_current_team_member")]
    
            for player in current_players:
                player_name = player.get("name", "Unknown")
                account_id = player.get("account_id", "Unknown")
                games_played = player.get("games_played", 0)
                wins = player.get("wins", 0)
                win_rate = (wins / games_played * 100) if games_played > 0 else 0
    
                formatted_players.append(
                    f"{player_name} (ID: {account_id})\n"
                    f"Games: {games_played}, Win Rate: {win_rate:.2f}%"
                )
    
        players_section = (
            "\n\nCurrent Players:\n" + "\n".join(formatted_players)
            if formatted_players
            else ""
        )
    
        return (
            f"Team: {team_name} [{team_tag}] (ID: {team_id})\n"
            f"Rating: {rating}\n"
            f"Record: {wins}-{losses} ({win_rate:.2f}% win rate)\n"
            f"Last Match: {last_match_time}{players_section}"
        )
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action ('Get information') without detailing whether this is a read-only operation, if it requires authentication, rate limits, error conditions, or what the return format entails. This is inadequate for a tool with zero 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 brief and structured with clear sections for Args and Returns. However, the 'Returns' section is overly vague ('Team information'), and the overall content could be more informative without sacrificing conciseness.

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, the description is minimally complete. However, it lacks details on behavioral aspects (like safety or constraints) and doesn't leverage the output schema to clarify return values, leaving gaps in overall context.

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

Parameters3/5

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

The description adds minimal semantics: it names the parameter ('team_id') and implies it's required, but provides no details on format, constraints, or examples. With 0% schema description coverage, this doesn't fully compensate, but it at least identifies the parameter, meeting the baseline for minimal documentation.

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 states 'Get information about a team' which provides a basic verb+resource combination, but it's vague about what specific information is retrieved. It doesn't distinguish this tool from potential sibling tools like 'get_player_by_id' or 'get_pro_teams' (if they existed), leaving ambiguity about scope and differentiation.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing a valid team_id), exclusions, or how it relates to sibling tools like 'get_player_by_id' or 'get_pro_players', leaving the agent without contextual usage instructions.

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