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

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, non-destructive, so the safety profile is covered; the description adds value beyond that with array ordering (bids descending, asks ascending, best first), the entry shape {px, sz, n}, and the default-vs-trimmed behavior of `depth`. It stops short of clarifying whether this is a one-shot snapshot or a streaming subscription despite the word 'Live', and says nothing about rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the resource and scope, then return shape, then the one behavioral knob. Dense and mostly waste-free, though the field enumeration (price, aggregate size, order count) partially duplicates the later {px, sz, n} notation.

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?

An output schema exists, so return values need not be explained, and the description nonetheless covers them fully; annotations cover the safety profile. The only real gap is not stating that this is a point-in-time snapshot from a REST info endpoint rather than a live subscription, which matters given the word 'Live'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3; both `coin` (perp symbol vs spot pair id/@N vs canonical name) and `depth` (default behavior) are fully documented in the schema. The description mostly restates the `depth` default and adds only marginal meaning beyond it.

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 verb+resource ('Live level-2 order book ... for one Hyperliquid perp or spot symbol'), enumerates the returned fields (price, aggregate size, order count), and names the underlying endpoint ({"type":"l2Book"}). An agent can immediately distinguish this from hyperliquid_mids or hyperliquid_candles without opening the schema.

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?

Gives concrete usage guidance for the `depth` parameter (trim to top N per side) and explains what happens when it is omitted (full book, 20+ levels). However, it never says when to prefer this tool over sibling market-data tools such as hyperliquid_mids, nor any exclusion or cost consideration.

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.