Skip to main content
Glama

get_top_trending_tokens

Retrieve the most actively traded cryptocurrency tokens within a specific time period to analyze market trends and compare performance metrics like market capitalization and trading volume.

Instructions

Get the top trending tokens in a particular time frame. Great for comparing market cap or volume.

Expects a TopTrendingTokensRequest, returns a list of tokens with their details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_trending_tokens_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler for 'get_top_trending_tokens'. Decorated with @mcp.tool() for automatic registration. Proxies the request to the global armor_client instance, handles login check and exceptions.
    @mcp.tool()
    async def get_top_trending_tokens(top_trending_tokens_requests: TopTrendingTokensRequest) -> List:
        """
        Get the top trending tokens in a particular time frame. Great for comparing market cap or volume.
        
        Expects a TopTrendingTokensRequest, returns a list of tokens with their details.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List = await armor_client.top_trending_tokens(top_trending_tokens_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic BaseModel defining the input schema for the tool, with a 'time_frame' field specifying the period for trending data.
    class TopTrendingTokensRequest(BaseModel):
        time_frame: Literal["5m", "15m", "30m", "1h", "2h", "3h", "4h", "5h", "6h", "12h", "24h"] = Field(default="24h", description="Time frame to get the top trending tokens")
  • Core implementation in ArmorWalletAPIClient that serializes the request and calls the backend API endpoint '/tokens/trending/' via POST.
    async def top_trending_tokens(self, data: TopTrendingTokensRequest) -> List:
        """Get the top trending tokens."""
        payload = data.model_dump(exclude_none=True)
        return await self._api_call("POST", f"tokens/trending/", payload)
  • Global initialization of the ArmorWalletAPIClient instance used by all tool handlers, loaded from environment variables.
    ACCESS_TOKEN = os.getenv('ARMOR_API_KEY') or os.getenv('ARMOR_ACCESS_TOKEN')
    BASE_API_URL = os.getenv('ARMOR_API_URL') or 'https://app.armorwallet.ai/api/v1'
    
    armor_client = ArmorWalletAPIClient(ACCESS_TOKEN, base_api_url=BASE_API_URL) #, log_path='armor_client.log')
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 input and output types but lacks details on rate limits, authentication needs, data freshness, or error handling. For a tool with no annotation coverage, this is insufficient to inform the agent about operational traits.

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 concise with three sentences that are front-loaded with the core purpose. Each sentence adds value: the first states the action, the second provides usage context, and the third clarifies input/output types. No wasted words, though it could be slightly more structured for clarity.

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 complexity (1 parameter with 0% schema coverage, no annotations, but has an output schema), the description is moderately complete. It covers the basic purpose and I/O types, but lacks details on parameters, behavioral traits, and usage guidelines. The output schema existence reduces the need to explain return values, but overall gaps remain for effective agent use.

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?

Schema description coverage is 0%, so the description must compensate. It references 'TopTrendingTokensRequest' as the input and implies a time frame parameter, adding some semantic context beyond the schema. However, it doesn't detail what fields the request includes or their formats, leaving parameters largely undocumented. Baseline 3 is appropriate as it adds minimal value over the bare schema.

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 with specific verbs ('Get the top trending tokens') and resource ('tokens'), and provides context about the time frame. It distinguishes itself from siblings by focusing on trending tokens rather than balances, orders, or other operations. However, it doesn't explicitly differentiate from potential similar tools like 'search_token_details' in terms of scope.

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 minimal guidance with 'Great for comparing market cap or volume,' which implies a use case but doesn't specify when to use this tool versus alternatives like 'search_token_details' or 'get_token_candle_data.' No explicit when-not-to-use or prerequisite information is given, leaving gaps in usage context.

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/emmaThompson07/armor-crypto-mcp'

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