Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_spot_metadata

Retrieve metadata for spot markets on Hyperliquid exchange, including trading pairs and contract details like symbol and tick size.

Instructions

Fetch metadata about spot markets on the Hyperliquid exchange.

Parameters:
    include_asset_ctxs (bool, optional): If True, includes asset contexts with metadata. Defaults to False.
    ctx (Context, optional): The MCP context object for accessing server state.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_asset_ctxsNo

Implementation Reference

  • main.py:360-376 (handler)
    The core handler function for the 'get_spot_metadata' MCP tool. It is registered via the @mcp.tool() decorator. The function calls the Hyperliquid SDK's spot_meta() or spot_meta_and_asset_ctxs() method based on the include_asset_ctxs parameter and returns the result as a JSON string, handling exceptions appropriately.
    async def get_spot_metadata(include_asset_ctxs: bool=False, ctx: Context=None) -> str:
        """
        Fetch metadata about spot markets on the Hyperliquid exchange.
    
        Parameters:
            include_asset_ctxs (bool, optional): If True, includes asset contexts with metadata. Defaults to False.
            ctx (Context, optional): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing metadata about spot markets, including trading pairs and contract details
                (e.g., symbol, tick size). Returns a JSON string with an error message if the query fails.
        """
        try:
            data = info.spot_meta_and_asset_ctxs() if include_asset_ctxs else info.spot_meta()
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch spot metadata: {str(e)}"})
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It mentions the tool returns JSON or error messages, but doesn't cover rate limits, authentication needs, data freshness, or what 'fails' means operationally. The return format is described, but behavioral context is minimal.

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 concise, with a clear purpose statement followed by parameter and return sections. Every sentence adds value: the first defines the tool, the second explains the optional parameter, and the third details the return format and error handling.

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 no annotations, 1 parameter with 0% schema coverage, and no output schema, the description is moderately complete. It covers the parameter and return format but lacks context on when to use it, error specifics, or integration with sibling tools. For a simple read operation, it's adequate but not 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 significant value beyond the input schema, which has 0% description coverage. It explains 'include_asset_ctxs' as including asset contexts with metadata and provides a default. However, it doesn't detail what 'asset contexts' contain or why to include them, leaving some semantic 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 tool's purpose: 'Fetch metadata about spot markets on the Hyperliquid exchange.' It specifies the resource (spot markets) and verb (fetch metadata), but doesn't explicitly differentiate from siblings like 'get_perp_metadata' beyond the 'spot' vs 'perp' distinction in names.

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 sibling tools, compare to 'get_perp_metadata' for perpetual markets, or specify use cases like needing spot market details for trading decisions.

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