Skip to main content
Glama

get_top_symbols_by_volume

Retrieve the highest-volume cryptocurrency symbols from the Wormhole protocol by specifying a time period (7d, 15d, or 30d) to analyze cross-chain transaction activity.

Instructions

Fetch top symbols 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 symbols by volume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeSpanNo7d

Implementation Reference

  • main.py:343-402 (handler)
    Handler function decorated with @mcp.tool() implementing the get_top_symbols_by_volume tool. Fetches data from Wormholescan API, validates input, processes into sorted DataFrame, returns markdown.
    # Define the get_top_symbols_by_volume tool
    @mcp.tool()
    async def get_top_symbols_by_volume(
        timeSpan: str = "7d"
    ) -> str:
        """
        Fetch top symbols 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 symbols 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-symbols-by-volume",
                    params=params
                )
                response.raise_for_status()
                
                # Parse JSON response
                data = response.json()
                
                # Transform data for DataFrame
                rows = [
                    {
                        "symbol": item.get("symbol"),
                        "volume": item.get("volume"),
                        "txs": item.get("txs")
                    }
                    for item in data.get("symbols", [])
                ]
                
                # Create DataFrame
                df = pd.DataFrame(rows)
                
                # Convert numeric columns
                df["volume"] = pd.to_numeric(df["volume"], errors="coerce")
                df["txs"] = pd.to_numeric(df["txs"], 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)        
  • main.py:344-344 (registration)
    The @mcp.tool() decorator registers the get_top_symbols_by_volume function as an MCP tool.
    @mcp.tool()
  • Function signature with type hints and docstring defining input schema (timeSpan: str) and output (str markdown table). Includes inline validation.
    async def get_top_symbols_by_volume(
        timeSpan: str = "7d"
    ) -> str:
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 API source ('Wormholescan API') and the return format ('String representation of a pandas DataFrame'), but fails to disclose critical traits like rate limits, authentication needs, error handling, or whether this is a read-only operation. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 sized and front-loaded, starting with the core purpose. The use of sections ('Args:', 'Returns:') adds structure, though the 'Args' section is slightly redundant since it only covers one parameter. Overall, it avoids unnecessary verbosity while conveying essential information efficiently.

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 nested objects) and lack of annotations or output schema, the description is minimally adequate. It covers the purpose, parameter details, and return format, but misses behavioral aspects like error handling or API constraints. Without an output schema, it should ideally explain the DataFrame structure more, but the current level is acceptable for basic functionality.

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 'timeSpan' by specifying allowed values ('7d, 15d, 30d') and the default ('7d'), which the input schema lacks (0% coverage). This compensates well for the schema's deficiency, making the parameter usage clear without needing to detail syntax or format extensively.

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 verb ('Fetch') and resource ('top symbols by volume from Wormholescan API'), making the purpose specific and understandable. However, it doesn't explicitly differentiate this tool from its sibling 'get_top_assets_by_volume' or 'get_top_chain_pairs_by_num_transfers', which might cause confusion about when to use each tool for similar volume-related queries.

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, such as the sibling tools 'get_top_assets_by_volume' or 'get_top_chain_pairs_by_num_transfers'. It lacks context about specific use cases, exclusions, or prerequisites, leaving the agent to infer usage based on the tool 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/kukapay/wormhole-metrics-mcp'

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