Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_perp_dexs

Retrieve metadata about perpetual markets on Hyperliquid DEX, including trading pairs and contract details like symbol and tick size.

Instructions

Retrieve metadata about perpetual markets available on the Hyperliquid decentralized exchange.

Parameters:
    ctx (Context): The MCP context object for accessing server state.

Returns:
    str: A JSON string containing metadata about perpetual markets, including a list of trading pairs and their
        contract details (e.g., symbol, tick size, contract type). Returns a JSON string with an error message if
        the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:104-122 (handler)
    The handler function for the 'get_perp_dexs' tool. It is registered via the @mcp.tool() decorator and implements the core logic by calling info.meta() from the Hyperliquid SDK to retrieve perpetual market metadata and returns it as a JSON string, with error handling.
    @mcp.tool()
    async def get_perp_dexs(ctx: Context) -> str:
        """
        Retrieve metadata about perpetual markets available on the Hyperliquid decentralized exchange.
    
        Parameters:
            ctx (Context): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing metadata about perpetual markets, including a list of trading pairs and their
                contract details (e.g., symbol, tick size, contract type). Returns a JSON string with an error message if
                the query fails.
        """
        try:
            data = info.meta()  # Use meta() as perp_dexs is not a valid SDK method
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch perpetual DEXs: {str(e)}"})
Behavior4/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 effectively describes the tool's behavior: it retrieves metadata, specifies the return format (JSON string with market details), and mentions error handling (returns error message on failure). However, it does not cover aspects like rate limits, authentication needs, or performance characteristics.

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 appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by structured sections for parameters and returns. Every sentence adds essential information without redundancy, making it efficient and well-organized.

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 the tool has 0 parameters, no output schema, and no annotations, the description is largely complete: it explains the purpose, parameters, and return values. However, it could improve by addressing potential limitations or linking to sibling tools for more context, but it adequately covers the basics for this simple retrieval tool.

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 input schema has 0 parameters with 100% coverage, so the baseline is 4. The description adds value by explaining the 'ctx' parameter as 'The MCP context object for accessing server state,' providing semantic context beyond the schema's empty properties.

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 metadata') and resource ('perpetual markets available on the Hyperliquid decentralized exchange'), distinguishing it from sibling tools like get_spot_metadata or get_perp_metadata by specifying it's about perpetual markets on a particular DEX.

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 for retrieving perpetual market metadata, but does not explicitly state when to use this tool versus alternatives like get_perp_metadata or get_all_mids. It provides context but lacks explicit guidance on 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