Skip to main content
Glama

Order book

get_order_book
Read-onlyIdempotent

Order book levels for one perpetual futures contract on one exchange, best first, as [price, size]. Use to judge liquidity before a large market order. Not for the best price across exchanges (use compare_venue_prices). Inputs: symbol, venue (without an account: hyperliquid only), depth (1-50 levels). Prices in USD per coin, sizes in the base coin. Next: preview_order.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "get_order_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoLevels per side
venueNoVenue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid if connected, else your only connected exchange, else the sandbox
symbolYesBase coin, e.g. BTC

Output Schema

NameRequiredDescriptionDefault
asksYes[price (USD per coin), size (in the base coin (e.g. BTC), not USD)], best first
bidsYes[price (USD per coin), size (in the base coin (e.g. BTC), not USD)], best first
venueYesVenue name
symbolYesBase coin
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / venue / default
      Removed value: -"hyperliquid"
  2. Changed1 schema field changed
    • changedInput schema / properties / venue / description
      Previous value: -"Venue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid, else your only connected venue, else sandbox"New value: +"Venue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid if connected, else your only connected exchange, else the sandbox"
  3. Changed14 schema fields changed
    • removedInput schema / properties / depth / title
      Removed value: -"Depth"
    • removedInput schema / properties / symbol / title
      Removed value: -"Symbol"
    • removedInput schema / properties / venue / title
      Removed value: -"Venue"
    • removedInput schema / title
      Removed value: -"get_order_bookArguments"
    • removedOutput schema / properties / asks / title
      Removed value: -"Asks"
    • removedOutput schema / properties / bids / title
      Removed value: -"Bids"
    • addedOutput schema / properties / deprecation / additionalProperties
      Added value: +true
    • removedOutput schema / properties / deprecation / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / deprecation / default
      Removed value: -null
    • removedOutput schema / properties / deprecation / title
      Removed value: -"Deprecation"
    • addedOutput schema / properties / deprecation / type
      Added value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / symbol / title
      Removed value: -"Symbol"
    • removedOutput schema / properties / venue / title
      Removed value: -"Venue"
    • removedOutput schema / title
      Removed value: -"OrderBook"
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint), so the bar is lower. The description still adds real behavioral context beyond them: ordering (best first), the [price, size] row layout, unit conventions (USD per coin, base coin sizes), and the account-dependent venue limitation. It does not discuss rate limits or snapshot latency, so it falls short of a 5.

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 what the tool returns, then usage, then the exclusion, then the inputs, then the next step. No sentence is redundant, and the input/unit summary is compact enough to scan in one pass despite the terse phrasing.

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?

An output schema exists, annotations define the safety profile, and all three parameters are documented in the schema with the description adding the venue-availability caveat. An agent has enough to call this correctly and to know when to route elsewhere.

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 the baseline is 3, but the description adds a constraint the schema does not state: without an account only hyperliquid is available. It also restates the depth range (1-50) and clarifies that sizes and prices refer to the contract on a single venue, which reinforces how symbol/venue interact.

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 ('Order book levels for one perpetual futures contract on one exchange'), plus ordering ('best first') and row shape ('as [price, size]'). This is clearly separable from compare_venue_prices, which it names explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the positive trigger ('judge liquidity before a large market order'), the exclusion plus named alternative ('Not for the best price across exchanges (use compare_venue_prices)'), and the downstream step ('Next: preview_order'). Nothing about selection is left to inference.

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.

Resources