Skip to main content
Glama

Order book aggregator

order_book_aggregator
Read-only

Perpetual-futures order books for one asset across OKX, Hyperliquid, dYdX and Kraken Futures, side by side and merged: per-venue best bid/ask and spread, depth and bid/ask imbalance within ±0.5%, ±1% and ±2% of each venue's mid (in quote value), the cross-venue best bid/ask and any crossed books between venues, and the top merged levels. Accepts BTC, BTCUSDT, BTC/USDT, BTC-USDT-SWAP or Kraken's XBT. Depth bands that extend past what a venue returns are flagged as lower bounds. Venues that fail are listed under errors; the call fails (and is not charged) only if none answers. Costs $0.005 USDC per call.

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": "order_book_aggregator"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelsNoPrice levels to show per venue and in the merged book, 1–50 (default 10)
symbolYesBase asset or pair, e.g. 'BTC', 'ETH', 'SOLUSDT', 'BTC/USDT'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses the $0.005 USDC per-call cost, partial-failure semantics (failed venues listed under errors; the call only fails and is not charged when no venue answers), and that depth bands exceeding venue data are flagged as lower bounds. These are exactly the traits an agent needs before spending money on a call.

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?

Front-loads what is returned and keeps operational caveats (lower bounds, errors, cost) in short trailing sentences. The output enumeration is dense and run-on, but for a multi-venue aggregation tool every listed field earns its place.

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?

With no output schema, the description carries the full burden of describing return values and does so in detail, plus covers pricing, error handling, and symbol normalization. Nothing an agent needs in order to call this correctly and interpret partial results is missing.

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 a 3 is the floor, but the description adds real meaning by listing accepted symbol formats including contract-style 'BTC-USDT-SWAP' and Kraken's 'XBT' alias, which the schema examples do not cover. It also references the depth-band/levels concept implicitly through the merged-levels description.

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 (perpetual-futures order books) and enumerates the exact venues (OKX, Hyperliquid, dYdX, Kraken Futures) plus the merge behavior, which cleanly separates it from siblings like perp_market_overview or pair_data. An agent can tell what it delivers 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 Guidelines4/5

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

The 'side by side and merged' framing plus the cross-venue best bid/ask and crossed-book outputs make the use case (cross-venue liquidity/spread comparison and arbitrage detection) clear. It stops short of explicitly naming an alternative sibling or a when-not condition, so it is context-rich rather than fully prescriptive.

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