Skip to main content
Glama
mutexa-labs

@mutexa/mcp

Official
by mutexa-labs

Liquidation price

liq_price
Read-onlyIdempotent

Calculates liquidation prices for isolated Hyperliquid perpetual positions or single-collateral Aave V3 loans using margin tiers, entry, size, margin, collateral, debt, and threshold inputs.

Instructions

Liquidation price of a fresh isolated Hyperliquid perp position (kind=perp: side, entry, size in coins, isolated margin in USD, and either coin to use that market's live margin tiers or maxLeverage for a single tier), or of a single-collateral, single-debt Aave V3 loan in standard mode (kind=loan: collateral amount, debt in USD, collateral price, liquidation threshold). Uses Hyperliquid's documented formula and Aave's health factor.

Input Schema

NameRequiredDescriptionDefault
coinNoperp: market whose live margin tiers to use
kindYes
sideNoPosition side
sizeNoperp: size in coins
entryNoperp: entry price
priceNoloan: collateral price in USD
marginNoperp: isolated margin in USD
debtUsdNoloan: debt in USD
collateralNoloan: collateral amount in tokens
maxLeverageNoperp: max leverage for a single tier, instead of coin
liqThresholdNoloan: liquidation threshold, 0..1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, open-world, so the bar is lower; the description still adds real value by disclosing that 'coin' triggers a live margin-tier fetch, that only fresh isolated perps are modeled, and that Aave inputs are restricted to standard mode single-collateral/single-debt. Those are genuine modeling limits an agent needs before trusting the output.

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?

Every clause carries information and the purpose leads the sentence. The trade-off is a single very long nested-parenthetical sentence that is harder to scan than a short bulleted split by kind would be.

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 an 11-parameter, two-mode calculator with no output schema, the description covers both modes' required inputs and where live data comes from, which is what an agent needs to select and invoke correctly. The return value is unambiguous from the title 'Liquidation price'.

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 91%, so the baseline is 3; the description earns a bump by grouping parameters by 'kind' (perp vs loan) and spelling out the coin-or-maxLeverage either/or, a mutual exclusivity the schema itself does not encode via oneOf. It does not explain units beyond the schema's own text or what happens if both are supplied.

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 opens with a specific computed quantity (liquidation price) and precisely names both supported model types, enumerating the inputs each expects. An agent can tell this is a calculator, not a position/loan viewer, but no sibling (e.g. liquidation_map, plan_ladder, plan_loans) is named as the alternative or contrast.

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?

Usage is implied rather than stated: 'fresh isolated' position and 'single-collateral, single-debt ... standard mode' loan scope out the cases this handles, which hints at when to reach for it. But there is no explicit when-to-use statement, no exclusions (e.g. cross margin, e-mode, multi-collateral), and no routing to liquidation_map or plan_ladder.

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