Skip to main content
Glama

Hyperliquid L2 Book

hyperliquid_l2_book
Read-onlyIdempotent

Live level-2 order book (bids + asks, each with price, aggregate size, and order count) for one Hyperliquid perp or spot symbol, from Hyperliquid's public info API ({"type":"l2Book"}). Returns two arrays — bids (best first, descending price) and asks (best first, ascending price) — each entry {px, sz, n}. Use depth to trim to the top N levels per side; Hyperliquid itself returns the full book (often 20+ levels per side) when depth is omitted.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "coin": "BTC",
      "depth": 3
    },
    "name": "hyperliquid_l2_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesPerp symbol (e.g. "BTC") or spot pair id (e.g. "@0" from hyperliquid_spot_meta, or the canonical name like "PURR/USDC").
depthNoLevels to keep per side, best-first (default: all levels Hyperliquid returns, typically 20+). Pass e.g. 5 for just the top of book.

Output Schema

NameRequiredDescriptionDefault
asksNo
bidsNo
coinNo
timeNo
as_ofNo
foundNo
fieldsNo
sourceNo
asks_levels_availableNo
bids_levels_availableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world, so the bar is lower. The description still adds real behavior: bids descending / asks ascending ordering, entry shape {px, sz, n}, and that omitting depth returns the full 20+ level book. Missing only rate-limit or freshness/latency notes.

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?

Front-loaded with the core noun phrase, then return shape, then the depth caveat. Three dense sentences, none of which restate the name or waste tokens.

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

Completeness5/5

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

For a two-parameter read tool with an output schema, annotations, and full schema coverage, this is complete: the agent knows the source, the symbol format, the return ordering, and the default behavior if depth is omitted.

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?

Schema coverage is 100%, so baseline is 3; the description goes beyond it by explaining the consequence of the depth default (full book, 20+ levels) and that depth trims best-first per side, which tells the agent why to set it rather than just its type.

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?

States a specific resource (live level-2 order book for one perp or spot symbol) with scope and source (Hyperliquid public info API, {type:"l2Book"}). An agent can immediately distinguish it from hyperliquid_mids, candles, or account tools.

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?

Usage is implied by the resource itself, and the description explains the `depth` trick for top-of-book, but it never routes between siblings (e.g. mids vs. book vs. candles) or states when-not to call it. No preconditions or symbol-resolution guidance beyond pointing at hyperliquid_spot_meta in the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.