Skip to main content
Glama

MoneyTools x402 agent toolkit

Liquidation price calculator

liquidation_price
Read-onlyIdempotent

Perp (isolated margin: side, entry, leverage, maintenance margin) or lending (collateral, debt, liquidation threshold → health factor) liquidation price and distance. Risk math, not advice. Free: 10 calls/day; then $0.001/call via x402 (MCP params._meta["x402/payment"] or HTTP) or X-API-Key credits. [served by tools.moneytools.dev]

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
modeNoperp | lending
sideNolong | short
entryNoentry price
priceNolending: collateral price
leverageNox
collateralNolending: collateral amount
maintenanceMarginNo%
liquidationThresholdNolending: LT %

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description usefully adds the rate limit (10 free calls/day, then $0.001/call), the payment paths (x402 via _meta or HTTP, or X-API-Key credits), and the 'risk math, not advice' caveat. It does not clarify unit conventions (e.g. whether maintenanceMargin 0.5 means 0.5% or 50%) or error behavior, which are real gaps for a numeric calculator.

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?

Dense and front-loaded: mode/inputs first, caveat second, cost and payment last, with no filler sentences. The telegraphic parenthesis style is slightly compressed but every clause carries information.

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 nine-parameter calculator with an output schema and full annotation coverage, the description supplies the mode selection logic, the cost model, and the scope caveat. Remaining ambiguity around percentage units and precision keeps it from being fully complete.

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 description coverage is 100%, so baseline is 3, but the description adds genuine meaning by partitioning the nine parameters into perp-mode and lending-mode groups and by indicating that liquidation threshold maps to a health factor output. That grouping is not expressed in the schema.

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: computes liquidation price and distance, and explicitly names the two supported position types (perp isolated margin vs lending) with the inputs each uses. An agent can distinguish this from a market-price tool like dex_price 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?

The parenthetical groupings tell the agent which parameter set selects perp mode versus lending mode, which is the key routing decision. It does not name an alternative tool or state when-not to use it, so it falls short of 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