Skip to main content
Glama

ScorpTech x402 Tools

Liquidation Price

liquidation_price
Read-onlyIdempotent

Liquidation calculator. mode=perp: isolated-margin long/short liquidation and bankruptcy price from entry price, leverage and maintenance margin rate (optionally size and fees), with distance to liquidation. mode=lending: health factor, liquidation price of the collateral and safe borrow headroom for Aave/Compound/Kamino/Morpho-style loans from collateral, debt and liquidation threshold. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/liquidation-price

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "liquidation_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
debtNolending: debt value in the same quote currency
modeNoperp
sideNoperp: position sidelong
sizeNoperp: optional position size in base units (for margin and notional)
feePctNoperp: optional closing fee in percent of notional, reserved from margin
leverageNoperp: leverage (notional / margin)
entryPriceNoperp: entry price
currentPriceNoOptional current price for distance and status (default entryPrice / collateralPrice)
collateralPriceNolending: collateral price
collateralAmountNolending: units of collateral
maintenanceMarginPctNoperp: maintenance margin rate in percent
liquidationThresholdPctNolending: liquidation threshold in percent (e.g. 82.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint, idempotentHint, openWorldHint), the description discloses that this is a paid endpoint ($0.002 USDC per successful call via x402 on Solana) and gives an HTTPS-equivalent URL. That cost/transport disclosure is material context an agent cannot get from the annotation block. It does not describe failure modes or rate limits.

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 core purpose followed by per-mode detail, then pricing and transport. Sentences are dense but each carries information; the trailing price/URL sentence is justified because it affects whether an agent should call at all.

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?

For a 12-parameter, zero-required calculator with no output schema, the description names the concrete results (liquidation price, bankruptcy price, distance to liquidation, health factor, safe borrow headroom), which is the key missing piece an output schema would normally supply. It does not spell out required-input combinations per mode, leaving some risk of an agent omitting mode-critical fields.

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 92%, and the schema already prefixes each parameter with 'perp:' or 'lending:', so the schema carries the parameter burden. The description mostly restates that mapping at the mode level ('entry price, leverage and maintenance margin rate (optionally size and fees)') without adding format, units, or interaction rules beyond it. Baseline 3 applies.

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+resource ('Liquidation calculator') and then enumerates exactly what is computed in each of two modes: isolated-margin liquidation/bankruptcy price for perps, and health factor / liquidation price / borrow headroom for lending positions. The two named modes make it clearly distinguishable from unrelated siblings like position_size or impermanent_loss.

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?

The mode=perp and mode=lending clauses effectively tell the agent which branch to select and which inputs belong to each, which is real usage guidance for a dual-purpose tool. It stops short of explicit when-not-to-use or naming a sibling alternative, so it is not a 5.

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