Skip to main content
Glama

Hyperliquid Segments

hl_segments
Read-onlyIdempotent

The Hyperliquid cohort vocabulary and its latest-snapshot positioning, by view. cohorts: the label sets per ladder, the exact spellings every cohort parameter accepts. segments: the catalogue with bounds, ranks and what each ladder measures (size is account value in USD; pnl is a percentile rank of cumulative realized PnL, not dollars; pnl_abs is dollars). summary: everything ONE cohort holds right now across all symbols: long/short notional in USD, bias a fraction from -1 to +1, pct_wallets_in_profit a FRACTION from 0 to 1 despite its name, exposure_ratio = notional / margin used, perp_bias = (long - short) / equity and equity_exposure = (long + short) / equity: positions on the main dex over the native perp account value, plus for a unified or portfolio-margin wallet the USDC it holds outside it (each wallet once, the whole account even under opened_within); builder-DEX positions are not included; wallets without a known positive equity are left out of perp_bias, equity_exposure and this share's numerator, see equity_covered_share (main-dex notional of the counted wallets / of the whole cohort). Unbounded ratios (above 1 = over 1x; null when equity <= 0); that equity is not total_equity, so perp_bias x total_equity != total_long_usd - total_short_usd. heatmap: the whole symbol x cohort board (large: every symbol with open interest; empty cells are omitted). Positions are the latest 5-minute snapshot. history: ONE cohort (cohort + axis, both required; axis is size or pnl only) hour by hour, summed over all symbols, newest first, from 2026-04-07: long_usd and short_usd in USD, bias = (long - short) / (long + short), a RATIO from -1 to +1 (null when both are 0), position_count = open positions, NOT wallets. Each hour carries the cohort label it had then (label_basis is point_in_time; pnl labels are daily before 2026-08-06, see label_computed). hours sizes the window, limit caps the rows, has_more says older rows exist. With include=leverage each hour also carries perp_bias, equity_exposure and equity_covered_share, the three summary ratios of that hour (null before 2026-08-11 and for a missing hour; perp_bias and equity_exposure are also null where no wallet has a known positive equity, and equity_covered_share is 0 when none is counted). An unknown cohort for the axis is an error. Same data as GET /v1/hl-cohorts/{cohorts, segments, segments/{cohort}/summary, heatmap, segments/{cohort}/history}.

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

Input Schema

NameRequiredDescriptionDefault
endNoISO-8601 UTC upper bound, e.g. 2026-10-02T00:00:00Z. `history` only: with no `start`, the window is the `hours` newest hours at or before it. Used by view: history.
axisNoCohort ladder: `size` = account-value tiers in USD, `pnl` = percentile rank of cumulative realized PnL (NOT dollars), `pnl_abs` = dollar bands of that same PnL. Per-position `trade_size` / `tier` is refused here. `history` serves history for `size` and `pnl` only, and requires `axis`. Default by view: summary size, heatmap size. Used by view: summary, heatmap, history. Required by view: history.
viewNoWhat to read. `segments`: the catalogue of every cohort bucket with its bounds and what the ladder measures. `cohorts`: the flat label sets, i.e. the exact spellings every `cohort` parameter accepts. `summary`: what ONE cohort holds right now across all symbols. `heatmap`: the whole symbol x cohort board at the latest snapshot. `history`: ONE cohort's hourly long, short and bias summed over all symbols, newest first (axis size or pnl only). Default `segments`.segments
hoursNo`history` only: window length in hours when `start` is omitted, ending at `end` or now. Max 8760. Used by view: history.
limitNo`history` only: max hourly rows, newest first; `has_more` says older ones exist, page back with `end` = the oldest `ts` minus 1 second. Max 5000. Used by view: history.
startNoISO-8601 UTC lower bound, e.g. 2026-10-01T00:00:00Z. `history` only; hours before 2026-04-07 are never returned. Used by view: history.
cohortNoOne label on `axis`, spelled exactly as `hl_segments` view=cohorts lists it, e.g. `whale` (size) or `3x smart` (pnl). Used by view: summary, history. Required by view: summary, history.
includeNo`history` only: comma list, only `leverage`; default none (nothing extra is read). Adds to every hourly row `perp_bias` = (long - short) / equity, `equity_exposure` = (long + short) / equity and `equity_covered_share` = main-dex notional of the counted wallets / main-dex notional of the whole cohort: unbounded ratios (above 1 = more than 1x of equity), main-dex positions of wallets with a known positive equity, each wallet once, over that equity: the native perp account, plus from the 2026-11-07 20:00 UTC hour on the USDC a unified or portfolio-margin wallet holds outside it (earlier hours stay native, so the two ratios step down there); builder-DEX positions are not included. An hour with no stored row, and any hour before `leverage.data_from` (2026-08-11), is null on all three (never 0). `perp_bias` and `equity_exposure` are also null when no counted wallet has a positive equity; `equity_covered_share` is null when the cohort holds no main-dex notional and a real 0 when it holds some but no wallet is counted. Hours rebuilt from fills rather than read from snapshots are null. An unknown token is refused. Used by view: history.
opened_withinNoOnly positions opened within this window: `24h`, `7d`, `30d` or `all`; positions with no known open time are left out of every bounded window. Used by view: summary, heatmap.all

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include / description
      Previous value: -"`history` only: comma list, only `leverage`; default none (nothing extra is read). Adds to every hourly row `perp_bias` = (long - short) / equity, `equity_exposure` = (long + short) / equity and `equity_covered_share` = main-dex notional of the counted wallets / main-dex notional of the whole cohort: unbounded ratios (above 1 = more than 1x of equity), native perp account only (main-dex positions of wallets with a known positive native equity, each wallet once; builder-DEX positions are not included). An hour with no stored row, and any hour before `leverage.data_from` (2026-08-11), is null on all three (never 0). `perp_bias` and `equity_exposure` are also null when no counted wallet has a positive equity; `equity_covered_share` is null when the cohort holds no main-dex notional and a real 0 when it holds some but no wallet is counted. Hours rebuilt from fills rather than read from snapshots are null. An unknown token is refused. Used by view: history."New value: +"`history` only: comma list, only `leverage`; default none (nothing extra is read). Adds to every hourly row `perp_bias` = (long - short) / equity, `equity_exposure` = (long + short) / equity and `equity_covered_share` = main-dex notional of the counted wallets / main-dex notional of the whole cohort: unbounded ratios (above 1 = more than 1x of equity), main-dex positions of wallets with a known positive equity, each wallet once, over that equity: the native perp account, plus from the 2026-11-07 20:00 UTC hour on the USDC a unified or portfolio-margin wallet holds outside it (earlier hours stay native, so the two ratios step down there); builder-DEX positions are not included. An hour with no stored row, and any hour before `leverage.data_from` (2026-08-11), is null on all three (never 0). `perp_bias` and `equity_exposure` are also null when no counted wallet has a positive equity; `equity_covered_share` is null when the cohort holds no main-dex notional and a real 0 when it holds some but no wallet is counted. Hours rebuilt from fills rather than read from snapshots are null. An unknown token is refused. Used by view: history."
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description still adds a great deal: 5-minute snapshot cadence, coverage windows, the fact that builder-DEX positions are excluded, that wallets without known positive equity are dropped from ratio numerators, that `history` starts 2026-04-07, and that leverage fields are null before 2026-08-11 and null (never 0) for missing hours. These are exactly the caveats an agent needs to interpret results without misreading zeros as real values.

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?

Content is front-loaded by view, but the result is one very dense block: the leverage ratio definitions (`perp_bias`, `equity_exposure`, `equity_covered_share`) are explained at length twice, once under `summary` and again under `include=leverage`, with only minor variation. Headers or per-view bullets would have made it scannable without losing content.

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 and nine parameters across five modes, the description carries the full burden and does so: it documents returned fields, units, null conditions, time boundaries, and exclusion rules for each view. An agent can call this correctly and interpret the response without further documentation.

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 the baseline is 3, but the description genuinely adds meaning the schema does not fully carry: `pnl` is a percentile rank rather than dollars, `pct_wallets_in_profit` is a fraction 0-1 despite its name, `bias` is a -1..+1 ratio, and the paging recipe for `limit` ('page back with `end` = the oldest `ts` minus 1 second') is spelled out. Some of this duplicates schema text, keeping it out of the top band.

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 the resource precisely (Hyperliquid cohort vocabulary plus latest-snapshot positioning) and enumerates all five read modes (`cohorts`, `segments`, `summary`, `heatmap`, `history`) with the specific payload each returns. An agent can tell what data it will get. It stops short of naming a sibling tool to differentiate from, so it falls just under the top band.

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?

Each `view` is paired with an explicit purpose ('`cohorts`: the flat label sets...', '`summary`: everything ONE cohort holds right now'), and required parameters per view are stated ('`history`: ONE cohort (`cohort` + `axis`, both required)'). It does not say when to reach for this tool instead of `hl_cohort_metrics` or `perp_long_short`, so alternative selection is left to inference.

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.