Skip to main content
Glama
kukapay

hyperliquid-whalealert-mcp

get_whale_alerts

Fetch recent whale alerts from Hyperliquid and display them as a Markdown table for tracking large cryptocurrency transactions.

Instructions

Fetch recent whale alerts and return as a Markdown table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:82-87 (handler)
    The handler function for get_whale_alerts tool that fetches whale data using the helper function and formats it to markdown before returning.
    @mcp.tool()
    async def get_whale_alerts(ctx: Context) -> str:
        """Fetch recent whale alerts and return as a Markdown table"""
        client = ctx.request_context.lifespan_context.client
        data = await fetch_whale_data(client)
        return json_to_markdown_list(data)
  • main.py:82-82 (registration)
    Decorator that registers the get_whale_alerts function as an MCP tool.
    @mcp.tool()
  • main.py:40-52 (helper)
    Helper function to fetch whale alert data from the Coinglass API.
    async def fetch_whale_data(client: httpx.AsyncClient) -> List[Dict[str, Any]]:
        try:
            response = await client.get(API_BASE_URL)
            response.raise_for_status()
            data = response.json()
            if data.get("code") != "0":
                raise ValueError(f"API error: {data.get('msg')}")
            return data.get("data", [])
        except httpx.HTTPStatusError as e:
            raise ValueError(f"HTTP error: {str(e)}")
        except Exception as e:
            raise ValueError(f"Failed to fetch whale data: {str(e)}")
  • main.py:54-79 (helper)
    Helper function to convert whale alert JSON data into a formatted Markdown list.
    def json_to_markdown_list(data: List[Dict[str, Any]]) -> str:
        if not data:
            return "No whale alert data available."
        
        markdown_lines = []
        for tx in data:
            # Map position_action to human-readable
            action = "Open" if tx.get("position_action") == 1 else "Close"
            
            # Convert timestamp (milliseconds) to readable format
            create_time = datetime.fromtimestamp(tx.get("create_time") / 1000.0).strftime("%Y-%m-%d %H:%M:%S")
            
            # Format transaction as Markdown list item
            item = (
                f"- **{tx.get('symbol')} Transaction**:\n"
                f"  - User Address: {tx.get('user')}\n"
                f"  - Position Size: {tx.get('position_size')}\n"
                f"  - Entry Price: ${tx.get('entry_price')}\n"
                f"  - Liquidation Price: ${tx.get('liq_price')}\n"
                f"  - Position Value (USD): ${tx.get('position_value_usd')}\n"
                f"  - Action: {action}\n"
                f"  - Create Time: {create_time}"
            )
            markdown_lines.append(item)
        
        return "\n".join(markdown_lines)
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic action and output format. It misses key behavioral details like rate limits, data source, error handling, or whether it's read-only/destructive, leaving significant gaps for an agent.

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 a single, efficient sentence that front-loads the core functionality ('Fetch recent whale alerts') and adds necessary detail ('return as a Markdown table') without any wasted words.

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

Completeness2/5

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

Given no annotations, no output schema, and a tool that fetches data, the description is incomplete. It lacks details on data scope (e.g., time range, number of alerts), error cases, or response structure beyond format, making it inadequate for reliable 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?

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but with no params, a baseline of 4 is appropriate as it doesn't have to compensate for gaps.

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 action ('Fetch') and resource ('recent whale alerts'), specifying the output format ('Markdown table'). However, with no sibling tools, it cannot demonstrate differentiation, so it doesn't reach a 5.

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, such as frequency, data freshness, or limitations. The description lacks any context about alternatives or prerequisites, offering only basic functional information.

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/hyperliquid-whalealert-mcp'

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