Skip to main content
Glama

get_player_wordcloud

Analyzes a Dota 2 player's in-game chat to identify their most frequently used words, providing insight into communication patterns.

Instructions

Get most common words used by player in chat.

Args:
    account_id: Steam32 account ID of the player

Returns:
    List of player's most frequently used words

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the get_player_wordcloud tool, decorated with @mcp.tool() for registration. It fetches wordcloud data from OpenDota API for a given player account_id, processes the top 20 most frequent words from chat, and returns a formatted string summary.
    @mcp.tool()
    async def get_player_wordcloud(account_id: int) -> str:
        """Get most common words used by player in chat.
    
        Args:
            account_id: Steam32 account ID of the player
    
        Returns:
            List of player's most frequently used words
        """
        wordcloud_data = await make_opendota_request(f"players/{account_id}/wordcloud")
    
        if "error" in wordcloud_data:
            return f"Error retrieving wordcloud data: {wordcloud_data['error']}"
    
        my_words = wordcloud_data.get("my_word_counts", {})
    
        if not my_words:
            return "No chat data found for this player."
    
        # Sort words by frequency
        sorted_words = sorted(my_words.items(), key=lambda x: x[1], reverse=True)
    
        # Get top 20 words
        top_words = sorted_words[:20]
    
        formatted_output = []
        for word, count in top_words:
            formatted_output.append(f"{word}: {count} times")
    
        return f"Most Common Words for Player ID {account_id}:\n\n" + "\n".join(
            formatted_output
        )
  • The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
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 data ('Get'), implying a read-only operation, but doesn't address critical aspects like rate limits, authentication needs, data freshness, or what constitutes 'chat' (e.g., in-game, post-match). The return format is mentioned but lacks detail on structure or limitations.

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 efficiently structured with a clear purpose statement followed by labeled 'Args' and 'Returns' sections. It avoids unnecessary words, though the 'Args' and 'Returns' labels are slightly redundant given the structured schema fields. Every sentence adds value.

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 moderate complexity (retrieving processed chat data), no annotations, and an output schema (implied by 'Has output schema: true'), the description is minimally adequate. It covers the purpose and parameter semantics but lacks behavioral context and usage guidelines. The output schema likely handles return values, reducing the burden on the description.

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: Steam32 account ID of the player.' The input schema has 0% description coverage (only title 'Account Id' and type 'integer'), so this clarification is essential. It specifies the ID format ('Steam32') and links it to the player, compensating well for the schema gap.

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 most common words used by player in chat.' It specifies the verb ('Get'), resource ('most common words'), and scope ('by player in chat'). However, it doesn't explicitly differentiate from sibling tools like 'get_player_recent_matches' or 'get_player_totals' beyond the wordcloud focus.

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 (e.g., whether the player must have chat history), exclusions, or comparisons to sibling tools like 'search_player' or 'get_player_by_id' that might provide overlapping or complementary data.

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