Skip to main content
Glama

Orderbook imbalance

get_orderbook_imbalance
Read-onlyIdempotent

Orderbook imbalance for any USDT perp: resting bid and ask liquidity in USD within ±N bps of mid, the ratio between the two sides, and a skew read. Costs 0.01 USDC per call (x402, USDC on Solana or Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bpsNowindow ±bps around mid, 5-500, default 50
symbolNoUSDT perp symbol e.g. SOLUSDT, BTCUSDT (default SOLUSDT)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesthe get_orderbook_imbalance payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_orderbook_imbalance
toolYesthe tool that produced this payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / symbol / description
      Previous value: -"USDT perp symbol e.g. SOLUSDT"New value: +"USDT perp symbol e.g. SOLUSDT, BTCUSDT (default SOLUSDT)"
    • removedInput schema / required
      Removed value: -[
      -  "symbol"
      -]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "the get_orderbook_imbalance payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_orderbook_imbalance",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "tool": {
      +      "const": "get_orderbook_imbalance",
      +      "description": "the tool that produced this payload",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, so safety is covered. The description adds genuinely new behavioral context the annotations cannot express: a per-call cost of 0.01 USDC settled via x402 on Solana or Base, which tells the agent this is a paid call and what payment rail it uses. It stops short of describing rate limits or latency.

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?

Two tightly packed sentences: the metric definition leads, the pricing disclosure follows. Every clause carries information and nothing is padded, though the first sentence is dense enough that a reader may need a second pass.

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-value shape need not be explained, and both optional parameters are fully covered by the schema with defaults. The description supplies the metric definition and the payment cost, which are the two things structured fields cannot convey; only the relative-positioning guidance versus sibling tools is absent.

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 coverage is 100%: both bps (window ±bps around mid, 5-500, default 50) and symbol (USDT perp, default SOLUSDT) are fully documented in the schema. The description's '±N bps of mid' restates the schema rather than adding format or boundary guidance, so baseline 3 applies.

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?

Names a specific resource (orderbook imbalance) and scopes it precisely to USDT perps, then defines the metric itself: resting bid/ask liquidity in USD within ±N bps of mid plus the ratio and a skew read. This is clearly distinguishable from the neighboring get_orderbook_walls, which surfaces resting wall sizes rather than the imbalance ratio.

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?

The description implies when the metric is useful (gauging two-sided liquidity pressure within a mid window) but never states when to prefer it over get_orderbook_walls, get_spread_arb, or get_long_short. No prerequisites or exclusions are given; usage must be inferred from the metric definition.

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.