Skip to main content
Glama

get_top100_corridors

Fetch the top 100 token corridors by transaction count from Wormholescan API to analyze cross-chain activity patterns.

Instructions

Fetch top 100 token corridors by number of transactions from Wormholescan API.

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

Returns:
    String representation of a pandas DataFrame containing top 100 corridors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeSpanNo2d

Implementation Reference

  • main.py:403-462 (handler)
    The main handler function for the 'get_top100_corridors' tool. It is registered via the @mcp.tool() decorator. Fetches top 100 corridors data from the Wormholescan API based on timeSpan (2d or 7d), transforms it into a pandas DataFrame with chain names resolved via id2name, sorts by txs descending, and returns a markdown table.
    # Define the get_top100_corridors tool
    @mcp.tool()
    async def get_top100_corridors(
        timeSpan: str = "2d"
    ) -> str:
        """
        Fetch top 100 token corridors by number of transactions from Wormholescan API.
        
        Args:
            timeSpan: Time span for data (2d, 7d). Default: 2d
        
        Returns:
            String representation of a pandas DataFrame containing top 100 corridors
        """
        try:
            # Validate parameters
            valid_time_spans = {"2d", "7d"}
            
            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-100-corridors",
                    params=params
                )
                response.raise_for_status()
                
                # Parse JSON response
                data = response.json()
                
                # Transform data for DataFrame
                rows = [
                    {
                        "source_chain": id2name(item.get("emitter_chain")),
                        "target_chain": id2name(item.get("target_chain")),
                        "token_chain": id2name(item.get("token_chain")),
                        "token_address": item.get("token_address"),
                        "txs": item.get("txs")
                    }
                    for item in data.get("corridors", [])
                ]
                
                # Create DataFrame
                df = pd.DataFrame(rows)
                
                # Convert txs to numeric
                df["txs"] = pd.to_numeric(df["txs"], errors="coerce")
                
                # Sort by txs descending for readability
                df = df.sort_values("txs", 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 states the tool fetches data from an API but doesn't mention rate limits, authentication needs, error handling, or whether it's a read-only operation. The return format is described as a string representation of a pandas DataFrame, which is useful but lacks details on structure or potential side effects.

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 with the core purpose in the first sentence. The Args and Returns sections are structured clearly, though the second sentence could be slightly more concise. Every sentence adds value, with no wasted words.

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 (1 parameter, no output schema, no annotations), the description is adequate but has gaps. It covers the purpose and parameters well but lacks usage guidelines, behavioral context like API constraints, and details on the DataFrame format. Without annotations or output schema, more completeness is needed for optimal agent use.

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 ('Time span for data'), provides allowed values ('2d, 7d'), and specifies a default ('Default: 2d'). This compensates well for the schema's lack of documentation, though it doesn't detail what '2d' or '7d' mean precisely.

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'), resource ('top 100 token corridors by number of transactions'), and source ('from Wormholescan API'). It distinguishes from siblings by focusing on corridors rather than assets, symbols, chain pairs, or other metrics like activity, KPIs, or money flow.

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 like get_top_chain_pairs_by_num_transfers or get_top_assets_by_volume. It mentions a timeSpan parameter but doesn't explain when to choose different values or why this tool is preferred over others for corridor analysis.

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