Skip to main content
Glama

Futures Basis

futures_basis
Read-onlyIdempotent

Dated (quarterly, monthly, weekly) futures on CEX venues (binance USDT-M and COIN-M, bybit, okx, deribit, gate, kraken) against the underlying: each live contract's price, its basis (price - ref) / ref and the annualised basis apr = basis x 365 / days to expiry, i.e. the cash-and-carry yield (buy spot, sell the future, hold to expiry) before fees. Both are fractions (0.01 = 1 %). ref picks the reference: index (default, the venue's index the contract settles against), spot (the same venue's spot pair) or perp (its perpetual). apr is null under 2 days to expiry, where noise annualises into huge numbers. Each row: exchange, symbol, instrument, expiry, days_to_expiry, type (linear or inverse), settle, contract_size, price and price_src (book mid, mark or last), index_price, spot_price, perp_price, basis, apr, vol_24h_usd, oi_usd, age_s. Sorted by apr (highest first) or expiry. symbol is the base asset ('BTC'). Same answer as GET /v1/marketdata/futures/basis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "futures_basis"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoThe price the basis is measured against. Default index.
sortNoapr (highest first, the default) or expiry (soonest first).
limitNoRows. Default 500, max 5000.
symbolNoBase asset, e.g. 'BTC'. Omit for every symbol.
exchangeNoOnly this venue (lower case): binance, bybit, okx, deribit, gate or kraken.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already carry readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds real behavior: units are fractions with a worked example (0.01 = 1%), apr is nulled below two days to expiry because annualisation explodes, default sort is apr descending, and default limit is 500 with a 5000 ceiling. It does not mention rate limits or latency, which keeps it off 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.

Conciseness4/5

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

Front-loaded with the scope, then the math, then the row fields — sensible ordering, no filler sentences. It is dense to the point of being a run-on in the middle (the ref and apr-null clauses are packed into the same block), which costs it the top score.

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 return-shape burden and does so fully by enumerating every row field (exchange, symbol, instrument, expiry, days_to_expiry, type, settle, contract_size, price and price_src, index/spot/perp price, basis, apr, vol_24h_usd, oi_usd, age_s) plus sort order. An agent has enough to call it and to explain the result, and the endpoint equivalence (GET /v1/marketdata/futures/basis) aids verification.

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%, so the baseline is 3 and the schema already documents all five parameters including enum meanings and the limit default/max. The description does enrich `ref` beyond the schema by spelling out what each mode measures (the venue's settlement index, its spot pair, its perpetual), but `symbol`, `exchange`, `sort`, and `limit` are only restated.

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-and-resource: dated futures basis across a named set of CEX venues, with the exact computed quantities (price, basis, annualised apr). It goes further and defines apr as the cash-and-carry yield, which an agent can match against a user request without opening anything else. No sibling in the catalog covers this domain, so no disambiguation burden remains.

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?

Usage is implied rather than prescribed: the description explains what `ref` selects and that apr is suppressed under two days to expiry, which helps interpret results, but never says when to prefer this over another call or what the prerequisites are (e.g. no key/auth notes, no caveat about venue coverage gaps). There are no explicitly named alternatives or when-not-to-use conditions.

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.