Skip to main content
Glama

get_top_assets_by_volume

Retrieve top-performing assets by transaction volume from the Wormhole cross-chain protocol. Specify time periods (7d, 15d, 30d) to analyze asset activity trends.

Instructions

Fetch top assets by volume from Wormholescan API.

Args:
    timeSpan: Time span for data (7d, 15d, 30d). Default: 7d

Returns:
    String representation of a pandas DataFrame containing top assets by volume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeSpanNo7d

Implementation Reference

  • main.py:223-282 (handler)
    The handler function decorated with @mcp.tool() that implements the get_top_assets_by_volume tool. It validates the timeSpan parameter, fetches data from the Wormholescan API, transforms it into a pandas DataFrame sorted by volume, and returns a markdown representation.
    # Define the get_top_assets_by_volume tool
    @mcp.tool()
    async def get_top_assets_by_volume(
        timeSpan: str = "7d"
    ) -> str:
        """
        Fetch top assets by volume from Wormholescan API.
        
        Args:
            timeSpan: Time span for data (7d, 15d, 30d). Default: 7d
        
        Returns:
            String representation of a pandas DataFrame containing top assets by volume
        """
        try:
            # Validate parameters
            valid_time_spans = {"7d", "15d", "30d"}
            
            if timeSpan not in valid_time_spans:
                raise ValueError(f"Invalid timeSpan. Must be one of {valid_time_spans}")
            
            # Construct query parameters
            params = {"timeSpan": timeSpan}
            
            # Make API request
            async with httpx.AsyncClient() as client:
                response = await client.get(
                    f"{API_BASE}/api/v1/top-assets-by-volume",
                    params=params
                )
                response.raise_for_status()
                
                # Parse JSON response
                data = response.json()
                
                # Transform data for DataFrame
                rows = [
                    {
                        "emitter_chain": id2name(item.get("emitterChain")),
                        "symbol": item.get("symbol"),
                        "token_chain": id2name(item.get("tokenChain")),
                        "token_address": item.get("tokenAddress"),
                        "volume": item.get("volume")
                    }
                    for item in data.get("assets", [])
                ]
                
                # Create DataFrame
                df = pd.DataFrame(rows)
                
                # Convert volume to numeric
                df["volume"] = pd.to_numeric(df["volume"], errors="coerce")
                
                # Sort by volume descending for readability
                df = df.sort_values("volume", ascending=False)
                
                return df.to_markdown(index=False)
                
        except Exception as e:
            return str(e)        
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 mentions the data source (Wormholescan API) and return format (string representation of a pandas DataFrame), but lacks details on rate limits, authentication needs, error handling, or whether this is a read-only operation. For a tool with zero annotation coverage, this is insufficient.

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 clear sections for Args and Returns. Every sentence earns its place by providing essential information without redundancy, making it efficient and well-structured.

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, no output schema, no annotations), the description is moderately complete. It covers the purpose, parameter details, and return format, but lacks behavioral context like rate limits or error handling. Without annotations or output schema, it should do more to be fully comprehensive.

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 significant meaning beyond the input schema, which has 0% coverage. It explains the 'timeSpan' parameter's purpose, valid values (7d, 15d, 30d), and default (7d), compensating fully for the schema's lack of documentation. With only one parameter well-explained, this earns a high score.

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

Purpose5/5

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

The description clearly states the specific action ('Fetch top assets by volume') and resource ('from Wormholescan API'), distinguishing it from sibling tools like get_top_symbols_by_volume or get_top_chain_pairs_by_num_transfers by focusing on assets rather than symbols or chain pairs. The verb 'fetch' is precise and the scope is well-defined.

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. While it implicitly suggests fetching top assets by volume, it doesn't mention when-not scenarios or compare it to siblings like get_top100_corridors or get_money_flow, leaving the agent without explicit 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/kukapay/wormhole-metrics-mcp'

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