Skip to main content
Glama

get_trending_tokens_on_pumpswap

Identify trending tokens on PumpSwap by retrieving the highest trading volume within specific time spans (5h, 12h, 24h), providing a formatted table with mint addresses and volume data for informed trading decisions.

Instructions

Retrieve tokens with the highest trading volume on PumpSwap within a specified time span.

Args:
    time_span (str): Time period for the query. Must be one of: '5h', '12h', '24h'.
        Defaults to '5h'.
    limit (int): Maximum number of tokens to return. Defaults to 100.

Returns:
    str: A formatted table of trending tokens on PumpSwap including mint address
        and trading volume, or an error message if the query fails.

Raises:
    ValueError: If an invalid time_span value is provided.
    httpx.HTTPStatusError: If the Dune API request fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
time_spanNo5h

Implementation Reference

  • main.py:294-331 (handler)
    The main handler function for the 'get_trending_tokens_on_pumpswap' tool. It fetches trending tokens on PumpSwap by querying Dune Analytics based on time_span ('5h', '12h', '24h'), processes the data using helpers like get_latest_result and strip_a_tag, formats it into a table using tabulate, and returns the result as a string.
    @mcp.tool()
    def get_trending_tokens_on_pumpswap(time_span: str = "5h", limit: int = 100) -> str:
        """Retrieve tokens with the highest trading volume on PumpSwap within a specified time span.
    
        Args:
            time_span (str): Time period for the query. Must be one of: '5h', '12h', '24h'.
                Defaults to '5h'.
            limit (int): Maximum number of tokens to return. Defaults to 100.
    
        Returns:
            str: A formatted table of trending tokens on PumpSwap including mint address
                and trading volume, or an error message if the query fails.
    
        Raises:
            ValueError: If an invalid time_span value is provided.
            httpx.HTTPStatusError: If the Dune API request fails.
        """
        query_ids = {
            "5h": 4929624,
            "12h": 4929617,
            "24h": 4929607,
        }
        try:
            query_id = query_ids.get(time_span)
            if query_id is None:
                raise ValueError("Invalid time_span value. Allowed: 5h | 12h | 24h")
            data = get_latest_result(query_id, limit=limit)
            rows = [
                [
                    strip_a_tag(row["contract_address"]),
                    f'${row["volume_usd"]:.2f}'
                ]
                for row in data
            ]
            headers = ["Mint Address", "Trading Volume"]
            return f"# Top {limit} Trending Tokens on PumpSwap - Last {time_span}\n\n" + tabulate(rows, headers=headers)
        except Exception as e:
            return str(e)  
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing: the tool queries Dune API, returns a formatted table or error message, and raises specific exceptions (ValueError, httpx.HTTPStatusError). It doesn't mention rate limits, authentication needs, or data freshness, but provides substantial behavioral context beyond basic functionality.

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?

Well-structured with clear sections (description, Args, Returns, Raises), front-loaded purpose statement, and every sentence earns its place. No redundant information - each section provides distinct value in minimal space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no annotations and no output schema, the description provides excellent coverage: clear purpose, parameter details, return format, and error conditions. It could improve by mentioning data source limitations or typical response time, but is largely complete for this complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed parameter semantics: time_span options ('5h', '12h', '24h') with default, limit parameter purpose with default, and clear formatting of the Args section. This adds significant value beyond the bare schema which only shows types and titles.

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 ('Retrieve tokens with the highest trading volume'), target resource ('on PumpSwap'), and scope ('within a specified time span'). It distinguishes from sibling tools by specifying the platform (PumpSwap) rather than other platforms like Raydium or different metrics like KOL trading volume.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the time span parameter options and mentions retrieving tokens with highest trading volume, but doesn't explicitly state when to use this tool versus alternatives like 'get_trending_tokens_on_raydium' or 'get_trending_tokens_by_kol_trading_volume'. No explicit guidance on when-not-to-use or comparisons with siblings is provided.

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

Related 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/memecoin-radar-mcp'

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