Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_user_staking_rewards

Retrieve staking reward history for a Hyperliquid account, providing transaction amounts and timestamps in JSON format.

Instructions

Fetch the staking rewards history for a specific user account.

Parameters:
    account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d').
    ctx (Context): The MCP context object for accessing server state.

Returns:
    str: A JSON string containing a list of staking reward records, each with amount and timestamp.
        Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYes

Implementation Reference

  • main.py:258-275 (handler)
    This is the implementation of the 'get_user_staking_rewards' tool handler. It is decorated with @mcp.tool(), which also serves as the registration in FastMCP. The function queries the Hyperliquid SDK's Info object for the user's staking rewards and returns the data as a JSON string, handling errors appropriately.
    async def get_user_staking_rewards(account_address: str, ctx: Context) -> str:
        """
        Fetch the staking rewards history for a specific user account.
    
        Parameters:
            account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d').
            ctx (Context): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing a list of staking reward records, each with amount and timestamp.
                Returns a JSON string with an error message if the query fails.
        """
        try:
            data = info.user_staking_rewards(account_address)
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch user staking rewards: {str(e)}"})
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool fetches historical data (implying read-only behavior) and mentions error handling (returns error message on failure), but lacks details on rate limits, authentication needs, or data freshness. It adds some behavioral context but not comprehensively.

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 well-structured with a clear purpose statement, parameter details, and return information in bullet points. Every sentence adds value without redundancy, making it efficient and easy to parse.

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?

Given no annotations, no output schema, and a single parameter, the description is mostly complete: it explains purpose, parameters, and return format. However, it could improve by mentioning data range limits or pagination for the history, though the simplicity of the tool makes this less critical.

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?

Schema description coverage is 0%, so the description must compensate. It fully documents the single parameter (account_address) with its type, example, and purpose, adding significant meaning beyond the bare schema. This effectively covers the parameter semantics.

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') and resource ('staking rewards history for a specific user account'), distinguishing it from siblings like get_user_staking_summary (which likely provides aggregated data) and other user-specific tools (e.g., get_user_fees, get_user_trade_history).

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

Usage Guidelines4/5

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

The description implies usage when historical staking reward data is needed for a user, but does not explicitly state when to use this versus alternatives like get_user_staking_summary or other user data tools. It provides clear context but lacks explicit exclusions or comparisons.

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-info-mcp'

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