Skip to main content
Glama
mektigboy

Hyperliquid MCP Server

by mektigboy

get_all_mids

Retrieve mid prices for all cryptocurrencies on the Hyperliquid exchange to access current market valuation data.

Instructions

Get mid prices for all coins on Hyperliquid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: fetches all mids using the Hyperliquid client's allMids method and returns a formatted response.
    export async function getAllMids(hyperliquidClient: PublicClient) {
      let allMids = await hyperliquidClient.allMids();
      return {
        content: [{ type: "text", text: JSON.stringify(allMids) }],
        isError: false,
      };
    }
  • Tool schema definition including name, description, and input schema (empty object since no parameters are required).
    export const ALL_MIDS_TOOL: Tool = {
      name: "get_all_mids",
      description: "Get mid prices for all coins on Hyperliquid",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    };
  • src/index.ts:75-80 (registration)
    Registers the get_all_mids tool (as ALL_MIDS_TOOL) in the MCP server's ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      console.error("Received ListToolsRequest");
      return {
        tools: [ALL_MIDS_TOOL, CANDLE_SNAPSHOT_TOOL, L2_BOOK_TOOL],
      };
    });
  • src/index.ts:46-48 (registration)
    Dispatches incoming CallToolRequests for "get_all_mids" to the getAllMids handler function.
    case "get_all_mids": {
      return await getAllMids(hyperliquidClient);
    }
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 states what the tool does but lacks details on traits such as whether it's read-only, requires authentication, has rate limits, or what the output format might be. This is a significant gap for a tool with zero 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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for a simple tool, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It explains what the tool does but fails to provide necessary context such as behavioral traits, output format, or usage guidelines relative to siblings. For a tool with no structured data support, this leaves significant gaps in understanding.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied since no parameters exist, and the description doesn't introduce confusion.

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 action ('Get') and resource ('mid prices for all coins on Hyperliquid'), making the tool's purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_candle_snapshot' or 'get_l2_book', which likely serve different purposes (e.g., retrieving candle data or order book data), so it falls short of a perfect score.

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 scenarios where this tool is preferred over siblings like 'get_candle_snapshot' or 'get_l2_book', nor does it specify prerequisites or exclusions. This lack of context leaves usage unclear.

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/mektigboy/server-hyperliquid'

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