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. Returns JSON with: mode, side, entryPrice, leverage, liquidationPrice, bankruptcyPrice, distanceToLiquidationPct, initialMarginPct. Price: $0.002 USDC per successful call (x402, Base or 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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds non-annotation behavior: pricing at $0.002 USDC per successful call via x402 on Base or Solana, plus an alternate HTTPS endpoint and the returned JSON fields. It does not document error behavior 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?

The description is front-loaded with the purpose, then mode-specific behavior, return fields, and payment details. It is dense but organized, with each sentence contributing something useful, though the HTTPS endpoint and pricing details are secondary to the core calculation semantics.

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 two-mode calculator with 12 parameters and no output schema, the description covers the essential behavioral split, key inputs, return fields, and payment model. It omits edge-case handling and error behavior, but an agent can call the tool correctly from the supplied information.

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?

With 92% schema description coverage, the schema already carries most parameter explanations, setting a baseline of 3. The description adds meaningful grouping beyond the schema: perp mode uses entry price, leverage, and maintenance margin rate with optional size and fees, while lending mode uses collateral, debt, and liquidation threshold. That grouping helps an agent select parameters correctly across the two modes.

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?

The description states a specific domain verb and resource: a liquidation calculator with distinct mode=perp and mode=lending behaviors. It names the computed outputs such as liquidation price, bankruptcy price, health factor, and borrow headroom, making the tool unambiguous.

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?

It clearly maps mode=perp to isolated-margin long/short positions and mode=lending to Aave/Compound/Kamino/Morpho-style loans, giving the agent a clear selection rule. It does not state explicit exclusions or when not to use the tool, but the mode split supplies strong usage context.

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