Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_user_order_by_cloid

Fetch order details by client order ID for a Hyperliquid account to check status, symbol, size, and price.

Instructions

Fetch details of a specific order by its client order ID for a user account.

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

Returns:
    str: A JSON string containing the order details, including symbol, size, price, and status.
        Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYes
cloidYes

Implementation Reference

  • main.py:298-316 (handler)
    The handler function decorated with @mcp.tool(), which registers and implements the tool. It queries order details by CLOID using the info module and returns a JSON string response or error.
    @mcp.tool()
    async def get_user_order_by_cloid(account_address: str, cloid: str, ctx: Context) -> str:
        """
        Fetch details of a specific order by its client order ID for a user account.
    
        Parameters:
            account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d').
            cloid (str): The client order ID to query.
            ctx (Context): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing the order details, including symbol, size, price, and status.
                Returns a JSON string with an error message if the query fails.
        """
        try:
            data = info.query_order_by_cloid(account_address, cloid)
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch user order by cloid: {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 details (implying read-only behavior) and mentions potential error returns, but it does not cover other behavioral aspects like rate limits, authentication needs, or side effects. It adds some context but is incomplete for a tool with no annotation coverage.

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 list, and return details. Every sentence adds value, and it is front-loaded with the core functionality. No wasted words or redundancy.

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 and no output schema, the description does a good job covering purpose, parameters, and return format. However, it lacks details on error handling specifics, behavioral constraints, or output structure beyond a high-level mention. It is mostly complete but has minor gaps for a tool with no structured support.

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 explicitly lists and explains all 2 parameters (account_address and cloid), providing examples and context beyond the schema. It also mentions the 'ctx' parameter, which is not in the input schema, adding further semantic clarity.

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 details') and resource ('specific order by its client order ID for a user account'), distinguishing it from sibling tools like get_user_order_by_oid (which uses a different identifier) and get_user_open_orders (which lists multiple orders). It precisely defines what the tool does.

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 implicitly indicates usage context by specifying 'for a user account' and naming the required parameters, but it does not explicitly state when to use this tool versus alternatives like get_user_order_by_oid or get_user_open_orders. It provides clear prerequisites but lacks explicit comparison or exclusion guidance.

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