Skip to main content
Glama
leverra-mcp

leverra-mcp

Official
by leverra-labs

Liquidation price (Hyperliquid formula)

liquidation_price
Read-onlyIdempotent

Calculate an isolated-margin liquidation price using Hyperliquid's formula; returns null when the position cannot be liquidated and requires the market's max leverage.

Instructions

Isolated-margin liquidation price with Hyperliquid's formula: maintenance margin is half the initial margin at the market's max leverage. Returns null when the position cannot be liquidated. Offline; get max_leverage from the venue.

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": {
      "entry": "<entry>",
      "notional": "<notional>",
      "leverage": "<leverage>",
      "max_leverage": "<max_leverage>",
      "side": "<side>"
    },
    "name": "liquidation_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes
entryYesEntry price.
leverageYesLeverage used.
notionalYesPosition size in USD.
max_leverageYesThe market's max leverage (e.g. 40 for BTC on Hyperliquid).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the description's 'Offline' largely restates the closed-world/no-side-effect profile. What it genuinely adds is the null return when a position is unliquidatable and the formula assumption behind the math. Useful, but modest beyond annotations.

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?

Three short sentences, front-loaded with the computation and its formula, then the edge-case return, then the prerequisite. No filler, though the formula clause is dense and could be split for scanability.

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?

No output schema exists, and the description covers the one non-obvious return case (null), implying a numeric price otherwise. It is adequate for a single-formula calculator; only edge cases such as leverage exceeding max_leverage go unaddressed.

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 coverage is 80% and all five parameters are required with their own descriptions, so the schema carries the load. The description adds the meaning of max_leverage (numeraire for the maintenance-margin rule) but says nothing extra about side, entry, notional, or how leverage interacts with max_leverage. Baseline 3 applies.

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 computed resource (isolated-margin liquidation price) and the exact formula variant used (maintenance margin = half initial margin at max leverage), which pins down semantics an agent could otherwise guess wrong. It does not explicitly contrast with siblings such as position_size, so it stops short of full sibling differentiation.

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?

'Isolated-margin' implicitly scopes out cross-margin use, and 'Offline; get max_leverage from the venue' tells the agent this is a pure computation whose prerequisite (max_leverage) must come from elsewhere. There is no explicit when-not-to-use or named alternative tool, which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.