Skip to main content
Glama

One-call trade context

trade_context
Read-onlyIdempotent

The pre-trade context blob in one call: price, the news read for that coin (summary, mood score, recent headlines), cross-venue funding with time-to-next-funding and carry arithmetic (optional position_usd), open interest, whale flow vs the coin's own baseline, and recent visible liquidations, on any streamed pair (on the free plans BTC in full and any other pair as a headline). Because the news rides along, this answers "why is X moving" in ONE call. compact: true returns the one-line composed answer, written in causal order (about 30 tokens). The percentile judgment vs the pair's own recorded days is keyless everywhere; on a pair outside the free set Starter adds the full 24h stats and whale USD magnitudes, and Pro adds the crowding score (locked_layers names what this plan withheld). Strictly descriptive: state plus recorded history, no advice. Descriptive market data only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinNoAlias for pair.
pairNoTrading pair, for example ETH/USD. A bare symbol like ETH is read as ETH/USD. Defaults to BTC/USD when omitted. On the free plans BTC answers in full and any other coin as a headline.
compactNoReturn one line of plain text rather than the JSON blob, about 30 tokens instead of 800. Same facts, same windows, same dates, no structured fields to read. Defaults to false.
position_usdNoPosition size in US dollars, for example 25000. Above zero only. When given, carry_cost adds per_day_usd_at_current_rate, the dollars a day the current funding average across exchanges works out to at that size. Arithmetic on the rate as it stands now, not a projection of future rates. Omit and carry_cost still carries the percentage and APR figures.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineNoThe composed one-line answer, returned only when compact:true was asked for. The same facts, the same windows and the same dates as the full shape.
newsNoWhat is being said about this coin, so a "why is it moving" question is answered in this one call: summary (the written one-liner), sentiment and sentiment_score (minus 100 to plus 100, NULL when nothing was recorded, which is not the same as neutral), points (the written points behind the summary, each with a kind), key_level, headlines (title, source, published, link) and macro (the same read for the market as a whole). available:false with covered:true means the coin is recorded and this plan reaches BTC and macro only.
noteNoOne line saying what the numbers cover, or why there are none. Read it before reporting any zero as a market reading.
pairNoThe pair this context describes.
depthNoWhich shape came back: lite, free-pair or keyed.
priceNoLast traded price.
compactNoPresent and true only on a compact:true call, where the whole answer is the single line in `line`.
fundingNoaverage_rate across exchanges, how many exchanges are in it, the interval in hours, and minutes to the next funding time.
crowdingNoThe crowding read and the overexposed side. Null without a paid plan.
availableNoFalse when this lane could not answer: a producer is dark, the pair sits outside this plan, or the argument named something we do not carry. Absent or true means the numbers are a real reading, not a guess.
stats_24hNoThe 24h statistics block. Absent on the lite shape, where locked_layers names it.
carry_costNoArithmetic on the current funding average: percent per day, the same as an annual rate, which side pays, and dollars a day when position_usd was passed. Not a projection of future rates.
whale_flowNoWhale direction against the same coin logged baseline: the multiple, days logged, record and N-day-high flags, and buy share now versus 7 days. Dollar sizes are added on a paid plan.
price_readsNoPlain descriptions of price against its own recent hours, computed from hourly candles: vs_recent_average (above or below its 50-hour and 200-hour average, and which way it is drifting), recent_move (how stretched the latest move is, plus the change against 7 days ago) and choppiness (calm, normal or choppy). Each block is available:true with values or available:false with a plain reason; a leg with too few recorded hours is null with a note, never a made-up neutral. Descriptive, not a trade signal.
locked_layersNoNamed rather than silently missing: which blocks this connection did not receive.
vs_own_historyNoWhere funding and open interest sit against the same pair recorded days: phrase, band, day count, the date the reading is from, and how past cases resolved.
open_interest_usdNoOpen interest in dollars across the exchanges that publish it.
liquidations_recentNoForced closes visible right now: count, long_usd, short_usd and window_minutes. A timing series, market-wide totals run higher.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / news
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What is being said about this coin, so a \"why is it moving\" question is answered in this one call: summary (the written one-liner), sentiment and sentiment_score (minus 100 to plus 100, NULL when nothing was recorded, which is not the same as neutral), points (the written points behind the summary, each with a kind), key_level, headlines (title, source, published, link) and macro (the same read for the market as a whole). available:false with covered:true means the coin is recorded and this plan reaches BTC and macro only."
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / pair / description
      Previous value: -"Trading pair, for example ETH/USD. A bare symbol like ETH is read as ETH/USD. Defaults to BTC/USD when omitted. Any streamed pair answers keyless; off the free pairs a keyless reply is the lite shape and names what it withheld in locked_layers."New value: +"Trading pair, for example ETH/USD. A bare symbol like ETH is read as ETH/USD. Defaults to BTC/USD when omitted. On the free plans BTC answers in full and any other coin as a headline."
  3. Changed3 schema fields changed
    • changedOutput schema / properties / crowding / description
      Previous value: -"The crowding read and the overexposed side. Null without a developer plan."New value: +"The crowding read and the overexposed side. Null without a paid plan."
    • addedOutput schema / properties / price_reads
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Plain descriptions of price against its own recent hours, computed from hourly candles: vs_recent_average (above or below its 50-hour and 200-hour average, and which way it is drifting), recent_move (how stretched the latest move is, plus the change against 7 days ago) and choppiness (calm, normal or choppy). Each block is available:true with values or available:false with a plain reason; a leg with too few recorded hours is null with a note, never a made-up neutral. Descriptive, not a trade signal."
      +}
    • changedOutput schema / properties / whale_flow / description
      Previous value: -"Whale direction against the same coin logged baseline: the multiple, days logged, record and N-day-high flags, and buy share now versus 7 days. Dollar sizes are added on a developer plan."New value: +"Whale direction against the same coin logged baseline: the multiple, days logged, record and N-day-high flags, and buy share now versus 7 days. Dollar sizes are added on a paid plan."
  4. Changed4 schema fields changed
    • addedInput schema / properties / compact / description
      Added value: +"Return one line of plain text rather than the JSON blob, about 30 tokens instead of 800. Same facts, same windows, same dates, no structured fields to read. Defaults to false."
    • addedInput schema / properties / pair / description
      Added value: +"Trading pair, for example ETH/USD. A bare symbol like ETH is read as ETH/USD. Defaults to BTC/USD when omitted. Any streamed pair answers keyless; off the free pairs a keyless reply is the lite shape and names what it withheld in locked_layers."
    • addedInput schema / properties / position_usd / description
      Added value: +"Position size in US dollars, for example 25000. Above zero only. When given, carry_cost adds per_day_usd_at_current_rate, the dollars a day the current funding average across exchanges works out to at that size. Arithmetic on the rate as it stands now, not a projection of future rates. Omit and carry_cost still carries the percentage and APR figures."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "available": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "False when this lane could not answer: a producer is dark, the pair sits outside this plan, or the argument named something we do not carry. Absent or true means the numbers are a real reading, not a guess."
      +    },
      +    "carry_cost": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Arithmetic on the current funding average: percent per day, the same as an annual rate, which side pays, and dollars a day when position_usd was passed. Not a projection of future rates."
      +    },
      +    "compact": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Present and true only on a compact:true call, where the whole answer is the single line in `line`."
      +    },
      +    "crowding": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The crowding read and the overexposed side. Null without a developer plan."
      +    },
      +    "depth": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Which shape came back: lite, free-pair or keyed."
      +    },
      +    "funding": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "average_rate across exchanges, how many exchanges are in it, the interval in hours, and minutes to the next funding time."
      +    },
      +    "line": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The composed one-line answer, returned only when compact:true was asked for. The same facts, the same windows and the same dates as the full shape."
      +    },
      +    "liquidations_recent": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Forced closes visible right now: count, long_usd, short_usd and window_minutes. A timing series, market-wide totals run higher."
      +    },
      +    "locked_layers": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Named rather than silently missing: which blocks this connection did not receive."
      +    },
      +    "note": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "One line saying what the numbers cover, or why there are none. Read it before reporting any zero as a market reading."
      +    },
      +    "open_interest_usd": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Open interest in dollars across the exchanges that publish it."
      +    },
      +    "pair": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The pair this context describes."
      +    },
      +    "price": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Last traded price."
      +    },
      +    "stats_24h": {
      +      "description": "The 24h statistics block. Absent on the lite shape, where locked_layers names it."
      +    },
      +    "vs_own_history": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Where funding and open interest sit against the same pair recorded days: phrase, band, day count, the date the reading is from, and how past cases resolved."
      +    },
      +    "whale_flow": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Whale direction against the same coin logged baseline: the multiple, days logged, record and N-day-high flags, and buy share now versus 7 days. Dollar sizes are added on a developer plan."
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds useful behavioral context: free-plan limitations, compact output mode, plan-tier feature additions, locked_layers, keyless percentile judgment, and the explicit 'descriptive only, no advice' boundary. It does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is front-loaded with the main purpose, but it is a long single paragraph with repeated phrases like 'descriptive market data only' and plan-tier details that could be tightened. It is informative but not concise.

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?

Given the tool's complexity, no required parameters, and an existing output schema, the description covers the key operational aspects: output format, compact mode, plan restrictions, parameter behavior, and the no-advice boundary. It is complete enough for an agent to use it correctly, though some details are left to the output schema.

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 description coverage is 100%, and the parameter descriptions in the schema already cover the same semantics (e.g., compact token count, position_usd behavior, coin alias, defaults). The description mostly repeats those details rather than adding new meaning, so the baseline 3 is appropriate.

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?

The description clearly specifies the tool's purpose: returning a composite pre-trade context blob with price, news, funding, open interest, whale flow, and liquidations in one call. It also explicitly frames the unique value: answering 'why is X moving' in ONE call, distinguishing it from narrower sibling tools.

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 description gives a clear use case: when you need the whole market context and news explanation for a coin in a single call. It also notes plan-tier behavior and compact mode. It does not explicitly mention alternatives or when not to use it, so it falls short of a 5.

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