Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_user_staking_summary

Retrieve staking details for a Hyperliquid user account, including staked amounts and current status, by providing the account address.

Instructions

Fetch the staking summary 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 the staking summary, including staked amounts and status.
        Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYes

Implementation Reference

  • main.py:237-254 (handler)
    The main handler function decorated with @mcp.tool(), which registers and implements the get_user_staking_summary tool. It queries the Hyperliquid SDK's info.user_staking_summary and returns the JSON result or error.
    @mcp.tool()
    async def get_user_staking_summary(account_address: str, ctx: Context) -> str:
        """
        Fetch the staking summary 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 the staking summary, including staked amounts and status.
                Returns a JSON string with an error message if the query fails.
        """
        try:
            data = info.user_staking_summary(account_address)
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch user staking summary: {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 mentions that it returns a JSON string with an error message on failure, which adds some context beyond the basic fetch operation. However, it lacks details on permissions, rate limits, side effects, or data freshness, leaving significant gaps for a tool that accesses user-specific staking data.

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 and front-loaded with the core purpose, followed by clear parameter and return sections. Every sentence adds value: the first states the purpose, the parameters section clarifies the input, and the returns section explains the output format and error handling. There is no wasted text.

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 (fetching user-specific staking data), no annotations, and no output schema, the description is adequate but incomplete. It covers the purpose, parameter semantics, and return format, but lacks behavioral details like authentication needs or data constraints. It's minimally viable but could be more comprehensive.

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 'account_address' by specifying it as a 'Hyperliquid account address' and providing an example format, which is valuable since the input schema has 0% description coverage. This compensates well for the schema's lack of detail, though it doesn't cover all possible edge cases or validation rules.

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 the resource 'staking summary for a specific user account', making the purpose unambiguous. It distinguishes from siblings like 'get_user_fees' or 'get_user_state' by specifying the staking context. However, it doesn't explicitly contrast with 'get_user_staking_rewards', which might be a related sibling, so it's not a perfect 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer this over other user-related tools like 'get_user_state' or 'get_user_staking_rewards', nor does it specify prerequisites or exclusions. The usage is implied by the purpose but not explicitly stated.

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