Skip to main content
Glama

Perp Long Short

perp_long_short
Read-onlyIdempotent

Long/short positioning that perp venues publish for one symbol: binance, bybit, gate, okx. The venues do NOT measure the same thing, so every row carries basis: binance = top traders by POSITIONS; okx and gate = top traders by ACCOUNTS; bybit = ALL accounts. Compare a venue with itself over time, never as a like-for-like average across venues. long_share / short_share are fractions of 1 (0.63 = 63 %); long_short_ratio = long / short (1.72 = 1.72 longs per short; above 1 is long-heavy). Without hours: the newest 5-minute print per venue and its age in seconds (venues printed within the last hour, stale_venues went silent). With hours (1-168): an hourly long_short_ratio series per venue, the last print in each UTC hour. Covers about 40 major symbols only; any other symbol returns empty lists and a note, never zeros. symbol is the canonical base asset ('BTC').

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

Input Schema

NameRequiredDescriptionDefault
hoursNoOmit for the latest print per venue. 1 to 168 for an hourly series over that many hours.
symbolYesRequired. Base asset, e.g. 'BTC', 'ETH', 'SOL' (not 'BTCUSDT').
exchangeNoOnly this venue (lower case), e.g. 'okx'. Omit for every venue.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the safety hints in the annotations, the description discloses crucial behavioral traits: data limitations (covers about 40 major symbols), the handling of unknown symbols (returns empty lists and a note), and the difference between fresh and stale venue data. This context is vital for accurate tool invocation.

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

Conciseness5/5

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

Despite its length, the definition is perfectly scoped. Every dense sentence addresses a necessary piece of information required for an agent to successfully parse, filter, or interpret the specific, complex data it retrieves.

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?

For a complex financial data retrieval tool, the description is exceptionally complete. It addresses data granularity, venue idiosyncrasies, time windows, and symbol restrictions, ensuring the agent has maximum context before attempting a call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant semantic value. It defines the canonical format for `symbol` (e.g., 'BTC' vs 'BTCUSDT'), explains the functional differences between omitting `hours` vs. supplying a range, and provides clear interpretations for metrics like `long_share`.

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 is highly specific, identifying the core function as providing Long/Short positioning data published by major perpetual venues (binance, bybit, gate, okx) for a single symbol. It clearly distinguishes itself by explaining the complex methodology required to aggregate this cross-venue data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The definition provides critical instructions on data interpretation, specifically stating that venues 'do NOT measure the same thing' and detailing the basis for each platform. It also explicitly guides the user on how the `hours` parameter changes the scope from the latest print to a historical time series.

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.