Skip to main content
Glama

AINDEX

Chance of touching a liquidation price

liquidation_risk
Read-only

The probability a perp position touches its liquidation price within N hours (default 24), from Yang-Zhang and Garman-Klass volatility on the last week of hourly candles and a closed-form barrier formula, plus the most leverage that keeps that chance at targetPct (default 5%). Give the liquidation price, or leverage to work it out from the entry and the venue's maintenance margin.

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>",
      "side": "<side>"
    },
    "name": "liquidation_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes
entryNo
hoursNo
symbolYes
leverageNo
targetPctNo
liquidationPriceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only declare readOnly and openWorld, so the description carries the substantive burden and does well: it names the volatility estimators (Yang-Zhang, Garman-Klass), the lookback (one week of hourly candles), the pricing approach (closed-form barrier formula), and both defaults. It omits what happens when neither liquidationPrice nor leverage is supplied, and gives no sense of numerical reliability or failure modes.

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 primary output and kept to two dense sentences with no filler. The second sentence is a long run-on that mixes input instructions with methodology, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter quantitative tool with no output schema, the description explains inputs and methodology but not the shape of the result (probability value, max leverage, implied liquidation price). The unresolved ambiguity about supplying both or neither of liquidationPrice/leverage is a real gap an agent would hit.

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 0% across 7 parameters, so the description must compensate. It explains the meaning of hours (N, default 24), targetPct (default 5%), and the liquidationPrice-vs-leverage alternative, plus the role of entry, but never mentions 'side' or the symbol format, and leaves leverage bounds (1-200) and hours bounds (1-720) unstated.

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?

States a specific computation ('probability a perp position touches its liquidation price within N hours') plus a secondary output (max leverage at targetPct), which is far more informative than the title alone. It does not explicitly distinguish itself from the sibling 'liquidation_map', so an agent must infer the boundary.

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 final sentence gives real invocation guidance: supply a liquidation price, or supply leverage and entry so it can be derived. However, there is no explicit statement of when to prefer this over liquidation_map, nor any prerequisite/exclusion (e.g. perp-only, venue support).

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