Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Liquidation Safety

workflow.run_liquidation_safety
Read-only

Calculate the liquidation price for an isolated-margin futures position with one flat maintenance margin rate (mmr, which you supply from your exchange's tier). It is a generic flat-rate model, for linear and inverse alike, not any one exchange's engine: no tiered maintenance amounts, no liquidation fee, no cross-margin (shared collateral) logic, so it does not apply to cross-margin accounts and can differ from an exchange's own figure. Use when user asks "where will I get liquidated?" or "how close is my liq price?". Returns: liquidationPrice, distancePct (how far from entry).

Input Schema

NameRequiredDescriptionDefault
mmrNoMaintenance margin rate, default 0.005 (0.5%)
sideYesTrade direction: "long" or "short"
leverageYesLeverage multiplier, e.g. 10 for 10x
entryPriceYesEntry price (positive)
contractTypeNolinear = USDT-margined (default), inverse = coin-margined (e.g. Deribit/Bybit/MEXC BTC-settled perps).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined (e.g. Deribit/Bybit/MEXC BTC-settled perps).",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a safe read-only, closed-world operation. The description adds substantial beyond-schema behavior: the flat-rate model assumption, the required user-supplied mmr from exchange tiers, and the caveat that results can diverge from an exchange's own engine. That is exactly the model-boundary disclosure an agent needs.

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 purpose, then limitations, then the return values; no filler sentences. The first sentence is long and clause-dense, which slightly hurts scannability, but every clause carries decision-relevant information.

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?

No output schema exists, and the description names the returned fields (liquidationPrice, distancePct with its meaning), so return values are covered. Combined with the model-scope caveats and trigger conditions, nothing an agent needs to call it correctly is missing.

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. The description goes further by explaining where mmr comes from (your exchange's tier) and framing contractType implicitly via the linear/inverse model scope, adding real meaning about how parameters must be sourced.

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 ("Calculate the liquidation price for an isolated-margin futures position") plus a precise model scope (flat mmr, linear and inverse). It also delineates what it is not (no tiered maintenance, no fee, no cross-margin), which lets an agent distinguish it from margin/leverage siblings without opening the schema.

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?

Gives explicit trigger phrasing ("where will I get liquidated?", "how close is my liq price?") and a clear exclusion (does not apply to cross-margin accounts). It stops short of naming a sibling tool to use instead for those cases, so it is strong but not fully routing.

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.