Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_cdp_health_factor_ltv

Calculate CDP health factor, LTV, collateral drop tolerance, and safe additional borrowing for MakerDAO, Aave, and Compound vaults to assess liquidation risk.

Instructions

Collateralized Debt Position (CDP) LTV & Liquidation Health Factor. Calculate Health Factor, Loan-to-Value (LTV), and collateral drop buffer before liquidation on MakerDAO (DAI), Aave, and Compound lending vaults. Discipline: CRYPTO. Governing mathematical model / formula: Health Factor = (Collateral Value × Liquidation Threshold) / Total Borrowed Debt.

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of current_health_factor (Vault Health Factor (HF)), current_ltv_pct (Current Loan-to-Value (LTV)), collateral_drop_tolerance (Collateral Price Drop to Liquidation), max_additional_borrow (Safe Additional Borrowing Capacity) using deposited_collateral_usd (Total Collateral Deposited ($ USD)), borrowed_debt_usd (Total Borrowed Debt ($ USD)), liquidation_threshold_pct (Protocol Liquidation Threshold (%) in %). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

DISAMBIGUATION & BOUNDARIES:

  • Use this dedicated specialist tool for 'Collateralized Debt Position (CDP) LTV & Liquidation Health Factor' rather than generic dispatchers like omni_universal_query.

  • For multi-calculation chained jobs, use 'omni_batch_calculate'.

  • To inspect schema fields, see 'omni_describe_solver'.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "cdp-health-factor-ltv"

    • category (string): "crypto"

    • name (string): "Collateralized Debt Position (CDP) LTV & Liquidation Health Factor"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.current_health_factor (Vault Health Factor (HF)): Formatted display string (e.g. '1.65')

      • metrics.current_ltv_pct (Current Loan-to-Value (LTV)): Formatted display string (e.g. '50.0%')

      • metrics.collateral_drop_tolerance (Collateral Price Drop to Liquidation): Formatted display string (e.g. '-39.4% Cushion')

      • metrics.max_additional_borrow (Safe Additional Borrowing Capacity): Formatted display string (e.g. '$4,125.00')

    • execution_time_ms (number): Latency in milliseconds.

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": "omni_cdp_health_factor_ltv"
  }
}

Input Schema

NameRequiredDescriptionDefault
borrowed_debt_usdNoTotal Borrowed Debt ($ USD). Outstanding borrowed loan balance (e.g. USDC, DAI). Default: 12500. Min: 100. Max: 2500000.
deposited_collateral_usdNoTotal Collateral Deposited ($ USD). Market value of pledged collateral (e.g. ETH, WBTC). Default: 25000. Min: 500. Max: 5000000.
liquidation_threshold_pctNoProtocol Liquidation Threshold (%) (%). Maximum LTV before vault liquidation triggers (Aave ETH = 82.5%). Default: 82.5. Min: 50. Max: 95.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares the tool read-only, idempotent, stateless, deterministic, and states that out-of-bounds inputs return a diagnostic error status rather than throwing. It also documents the full response envelope including status values and the metrics keys with example formats.

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?

Well front-loaded with a one-line purpose, then formula, usage, and returns in scannable sections. It is on the verbose side — labels are repeated verbatim inside the RETURNS block and the schema description, and there is a redundant '(%)(%)' in the threshold parameter — but no section is genuinely off-topic.

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?

Three numeric parameters, all described with bounds and defaults, a stated formula, an explicit error path, and a detailed RETURNS breakdown that compensates for the absent output schema. An agent has everything needed to call it and interpret the result without further probing.

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 100% and each property already documents type, default, min/max, and meaning, so the description largely restates it. It does add slight value by tying inputs to outputs (liquidation_threshold_pct feeding the health-factor formula), but that relationship is also implied by the formula line, keeping this at the high-coverage baseline.

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 and resource: calculate Health Factor, LTV, and collateral drop buffer for CDPs on MakerDAO, Aave, and Compound. It gives the governing formula so the agent knows exactly what computation is performed, and the name plus description make it distinct from the LTV family siblings (omni_ltv, omni_clv_ltv, omni_ltv_cac_ratio).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit WHEN TO USE lists the exact computed outputs and the inputs that drive them; WHEN NOT TO USE excludes qualitative or non-numeric requests. Disambiguation names concrete alternatives — omni_universal_query for generic dispatch, omni_batch_calculate for chained jobs, omni_describe_solver for schema inspection.

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

Deploy Server

Other Tools