Skip to main content
Glama

Order Book Snapshot

flow_orderbook
Read-only

Order-book snapshot for one coin's perpetuals: best bid/ask, spread in bps, top-of-book depth (USD) per side, bid/ask depth imbalance, and the cost vs mid of $10k and $100k market orders against the visible levels. Positive imbalance means more bid depth. Single-venue by nature — Hyperliquid, falling back to Bybit for coins it doesn't list; the response names the venue that answered and how far its visible book reaches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesCoin symbol, e.g. "BTC".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
asOfAtNoOrder-book timestamp, ISO-8601 UTC
asOfMsNoOrder-book timestamp, Unix epoch milliseconds
sourceNoVenue that served the book
symbolYes
fillCostsNoCost vs mid of a market order of each size against the visible levels
spreadBpsNoBid/ask spread, basis points of mid
bestAskUsdNoBest ask price, USD
bestBidUsdNoBest bid price, USD
askDepthUsdNoTop-of-book ask depth, USD
bidDepthUsdNoTop-of-book bid depth, USD
midPriceUsdNoMid price, USD
imbalancePctNoSigned bid-vs-ask depth skew in percentage points (positive = more bids)
visibleAskReachPctNoDeepest returned ask vs mid, percent; nothing beyond is visible
visibleBidReachPctNoDeepest returned bid vs mid, percent; nothing beyond is visible

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / fillCosts
      Added value: +{
      +  "description": "Cost vs mid of a market order of each size against the visible levels",
      +  "items": {
      +    "properties": {
      +      "buyBps": {
      +        "description": "Average buy fill vs mid in bps; absent when the visible asks can't fill the size",
      +        "type": "number"
      +      },
      +      "sellBps": {
      +        "description": "Average sell fill vs mid in bps (positive = cost); absent when the visible bids can't fill the size",
      +        "type": "number"
      +      },
      +      "sizeUsd": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "sizeUsd"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / visibleAskReachPct
      Added value: +{
      +  "description": "Deepest returned ask vs mid, percent; nothing beyond is visible",
      +  "type": "number"
      +}
    • addedOutput schema / properties / visibleBidReachPct
      Added value: +{
      +  "description": "Deepest returned bid vs mid, percent; nothing beyond is visible",
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / source
      Added value: +{
      +  "description": "Venue that served the book",
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With only readOnlyHint=true in annotations, the description carries most of the burden and delivers real value: it discloses venue selection and fallback (Hyperliquid then Bybit), that the response names the answering venue and how far its visible book reaches, and how to read imbalance (positive = more bid depth). It stops short of stating data staleness/refresh characteristics, which matter a great deal for an order-book tool.

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?

It is a single dense paragraph, but every clause earns its place: the return fields, the imbalance interpretation, and the venue/fallback note are all decision-relevant. It is slightly front-loaded with an enumeration rather than a purpose statement, but it wastes no sentences.

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?

For a one-parameter tool with an output schema, the description covers the unusual behaviors an agent could not infer from structured data — venue fallback, venue naming, book depth reporting, and imbalance sign convention. Missing only operational details such as freshness/latency, which are not carried by any other structured field either.

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?

There is a single parameter with 100% schema description coverage, so the schema already documents 'symbol' including a usage example ('BTC'). The description adds no format or coverage detail beyond that, which is exactly the baseline-3 case when structured fields do the heavy lifting.

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 names a specific resource (order-book snapshot for one coin's perpetuals) and enumerates exactly what it returns: best bid/ask, spread in bps, depth, imbalance, and $10k/$100k market-order cost. It is clearly distinct from market_quotes or fundraising tools. However, it never explicitly positions itself against the close sibling flow_levels, which also concerns order-book levels, so the differentiation is not fully nailed down.

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?

There is no explicit when-to-use or when-not-to-use statement, and no alternative is named. Usage is only implied: the field list makes it obvious this is for measuring top-of-book liquidity and slippage. The one contextual remark ('Single-venue by nature', with a Hyperliquid-to-Bybit fallback) helps an agent understand what it is getting, but does not tell it when to reach for this tool.

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