Skip to main content
Glama

Get Liquidation Risk

get_liquidation_risk
Read-only

Assess DeFi liquidation risk for up to 50 wallets across expanded Aave v3 and Compound v3 coverage on Ethereum (chain_id=1) or Base (chain_id=8453). Returns per-wallet health factor and tiered risk classification (liquidatable, critical, warning, caution, healthy, no_debt) plus an overall_tier aggregate across protocols, and a summary count for alert dashboards. Per-protocol failures are isolated — a Compound RPC error does not blank the Aave result (and vice versa). View-only (eth_call) against hardcoded protocol addresses; duplicate wallet addresses are silently removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idNoChain ID (1=Ethereum, 8453=Base)
wallet_addressesYesWallet addresses to assess (max 50; duplicates are silently removed).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOn-chain liquidation-risk snapshot at data_block_number. Aave risk_tier is derived from the numeric health factor: liquidatable (<1.0), critical (<1.05), warning (<1.15), caution (<1.5), healthy (≥1.5). Compound v3 exposes only a boolean isLiquidatable — a numeric health factor is not available from this tool; do not attempt to compute, estimate, or infer it via additional tool calls. Do not infer a Compound liquidation or breach price from this output. overall_tier is the worst tier across protocols for each wallet. Aave USD values are base-currency 8-decimal from the Aave oracle. Duplicate wallet addresses in the request are deduplicated silently.
resultsYes
summaryYes
chain_idYes
data_block_numberYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed15 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / chain_id / title
      Added value: +"Chain Id"
    • addedInput schema / properties / wallet_addresses / title
      Added value: +"Wallet Addresses"
    • addedInput schema / title
      Added value: +"mcp_get_liquidation_riskArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "AaveRisk": {
      +    "properties": {
      +      "health_factor": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Health Factor"
      +      },
      +      "liquidation_threshold_bps": {
      +        "title": "Liquidation Threshold Bps",
      +        "type": "integer"
      +      },
      +      "ltv_bps": {
      +        "title": "Ltv Bps",
      +        "type": "integer"
      +      },
      +      "risk_tier": {
      +        "title": "Risk Tier",
      +        "type": "string"
      +      },
      +      "total_collateral_usd": {
      +        "title": "Total Collateral Usd",
      +        "type": "number"
      +      },
      +      "total_debt_usd": {
      +        "title": "Total Debt Usd",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "health_factor",
      +      "risk_tier",
      +      "total_collateral_usd",
      +      "total_debt_usd",
      +      "liquidation_threshold_bps",
      +      "ltv_bps"
      +    ],
      +    "title": "AaveRisk",
      +    "type": "object"
      +  },
      +  "CompoundRisk": {
      +    "properties": {
      +      "base_asset_symbol": {
      +        "title": "Base Asset Symbol",
      +        "type": "string"
      +      },
      +      "borrow_balance_raw": {
      +        "title": "Borrow Balance Raw",
      +        "type": "string"
      +      },
      +      "is_liquidatable": {
      +        "title": "Is Liquidatable",
      +        "type": "boolean"
      +      },
      +      "market_address": {
      +        "title": "Market Address",
      +        "type": "string"
      +      },
      +      "market_name": {
      +        "title": "Market Name",
      +        "type": "string"
      +      },
      +      "risk_tier": {
      +        "title": "Risk Tier",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "market_name",
      +      "market_address",
      +      "base_asset_symbol",
      +      "is_liquidatable",
      +      "borrow_balance_raw",
      +      "risk_tier"
      +    ],
      +    "title": "CompoundRisk",
      +    "type": "object"
      +  },
      +  "ProtocolErrorInfo": {
      +    "properties": {
      +      "error": {
      +        "title": "Error",
      +        "type": "string"
      +      },
      +      "protocol": {
      +        "title": "Protocol",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "protocol",
      +      "error"
      +    ],
      +    "title": "ProtocolErrorInfo",
      +    "type": "object"
      +  },
      +  "RiskSummary": {
      +    "properties": {
      +      "caution_count": {
      +        "title": "Caution Count",
      +        "type": "integer"
      +      },
      +      "critical_count": {
      +        "title": "Critical Count",
      +        "type": "integer"
      +      },
      +      "healthy_count": {
      +        "title": "Healthy Count",
      +        "type": "integer"
      +      },
      +      "liquidatable_count": {
      +        "title": "Liquidatable Count",
      +        "type": "integer"
      +      },
      +      "no_debt_count": {
      +        "title": "No Debt Count",
      +        "type": "integer"
      +      },
      +      "total_wallets": {
      +        "title": "Total Wallets",
      +        "type": "integer"
      +      },
      +      "warning_count": {
      +        "title": "Warning Count",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "total_wallets",
      +      "liquidatable_count",
      +      "critical_count",
      +      "warning_count",
      +      "caution_count",
      +      "healthy_count",
      +      "no_debt_count"
      +    ],
      +    "title": "RiskSummary",
      +    "type": "object"
      +  },
      +  "WalletRiskResult": {
      +    "properties": {
      +      "aave": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/AaveRisk"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "chain_id": {
      +        "title": "Chain Id",
      +        "type": "integer"
      +      },
      +      "compound": {
      +        "items": {
      +          "$ref": "#/$defs/CompoundRisk"
      +        },
      +        "title": "Compound",
      +        "type": "array"
      +      },
      +      "errors": {
      +        "items": {
      +          "$ref": "#/$defs/ProtocolErrorInfo"
      +        },
      +        "title": "Errors",
      +        "type": "array"
      +      },
      +      "overall_tier": {
      +        "title": "Overall Tier",
      +        "type": "string"
      +      },
      +      "wallet_address": {
      +        "title": "Wallet Address",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "wallet_address",
      +      "chain_id",
      +      "overall_tier"
      +    ],
      +    "title": "WalletRiskResult",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / results / items / $ref
      Added value: +"#/$defs/WalletRiskResult"
    • removedOutput schema / properties / results / items / properties
      Removed value: -{
      -  "aave": {
      -    "anyOf": [
      -      {
      -        "properties": {
      -          "health_factor": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "title": "Health Factor"
      -          },
      -          "liquidation_threshold_bps": {
      -            "title": "Liquidation Threshold Bps",
      -            "type": "integer"
      -          },
      -          "ltv_bps": {
      -            "title": "Ltv Bps",
      -            "type": "integer"
      -          },
      -          "risk_tier": {
      -            "title": "Risk Tier",
      -            "type": "string"
      -          },
      -          "total_collateral_usd": {
      -            "title": "Total Collateral Usd",
      -            "type": "number"
      -          },
      -          "total_debt_usd": {
      -            "title": "Total Debt Usd",
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "health_factor",
      -          "risk_tier",
      -          "total_collateral_usd",
      -          "total_debt_usd",
      -          "liquidation_threshold_bps",
      -          "ltv_bps"
      -        ],
      -        "title": "AaveRisk",
      -        "type": "object"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "default": null
      -  },
      -  "chain_id": {
      -    "title": "Chain Id",
      -    "type": "integer"
      -  },
      -  "compound": {
      -    "items": {
      -      "properties": {
      -        "base_asset_symbol": {
      -          "title": "Base Asset Symbol",
      -          "type": "string"
      -        },
      -        "borrow_balance_raw": {
      -          "title": "Borrow Balance Raw",
      -          "type": "string"
      -        },
      -        "is_liquidatable": {
      -          "title": "Is Liquidatable",
      -          "type": "boolean"
      -        },
      -        "market_address": {
      -          "title": "Market Address",
      -          "type": "string"
      -        },
      -        "market_name": {
      -          "title": "Market Name",
      -          "type": "string"
      -        },
      -        "risk_tier": {
      -          "title": "Risk Tier",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "market_name",
      -        "market_address",
      -        "base_asset_symbol",
      -        "is_liquidatable",
      -        "borrow_balance_raw",
      -        "risk_tier"
      -      ],
      -      "title": "CompoundRisk",
      -      "type": "object"
      -    },
      -    "title": "Compound",
      -    "type": "array"
      -  },
      -  "errors": {
      -    "items": {
      -      "properties": {
      -        "error": {
      -          "title": "Error",
      -          "type": "string"
      -        },
      -        "protocol": {
      -          "title": "Protocol",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "protocol",
      -        "error"
      -      ],
      -      "title": "ProtocolErrorInfo",
      -      "type": "object"
      -    },
      -    "title": "Errors",
      -    "type": "array"
      -  },
      -  "overall_tier": {
      -    "title": "Overall Tier",
      -    "type": "string"
      -  },
      -  "wallet_address": {
      -    "title": "Wallet Address",
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / properties / results / items / required
      Removed value: -[
      -  "wallet_address",
      -  "chain_id",
      -  "overall_tier"
      -]
    • removedOutput schema / properties / results / items / title
      Removed value: -"WalletRiskResult"
    • removedOutput schema / properties / results / items / type
      Removed value: -"object"
    • addedOutput schema / properties / summary / $ref
      Added value: +"#/$defs/RiskSummary"
    • removedOutput schema / properties / summary / properties
      Removed value: -{
      -  "caution_count": {
      -    "title": "Caution Count",
      -    "type": "integer"
      -  },
      -  "critical_count": {
      -    "title": "Critical Count",
      -    "type": "integer"
      -  },
      -  "healthy_count": {
      -    "title": "Healthy Count",
      -    "type": "integer"
      -  },
      -  "liquidatable_count": {
      -    "title": "Liquidatable Count",
      -    "type": "integer"
      -  },
      -  "no_debt_count": {
      -    "title": "No Debt Count",
      -    "type": "integer"
      -  },
      -  "total_wallets": {
      -    "title": "Total Wallets",
      -    "type": "integer"
      -  },
      -  "warning_count": {
      -    "title": "Warning Count",
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / summary / required
      Removed value: -[
      -  "total_wallets",
      -  "liquidatable_count",
      -  "critical_count",
      -  "warning_count",
      -  "caution_count",
      -  "healthy_count",
      -  "no_debt_count"
      -]
    • removedOutput schema / properties / summary / title
      Removed value: -"RiskSummary"
    • removedOutput schema / properties / summary / type
      Removed value: -"object"
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true, and the description reinforces with 'View-only (eth_call)' plus adds valuable behavioral details: per-protocol failure isolation, silent duplicate removal, and hardcoded addresses. These go beyond the annotation and give the agent confidence about side-effect-free operation and error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, then output summary, then edge-case behaviors. No fluff; every sentence contributes value and the structure is logical.

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?

With an output schema present, return types are already documented. The description adds failure isolation, deduplication, and the full tier list, covering edge cases. No major gaps remain.

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% with descriptions for both chain_id and wallet_addresses. The description repeats the max 50 and chain IDs but doesn't add new parameter-level meaning beyond the schema. Baseline of 3 is appropriate since the schema already does the heavy lifting.

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 clearly states the tool's function with a specific verb and resource: 'Assess DeFi liquidation risk for up to 50 wallets across expanded Aave v3 and Compound v3 coverage.' It names the chains, protocols, and output types, distinguishing it from sibling tools like get_defi_positions or get_lending_rates.

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?

The description implies usage for liquidation risk assessment, but it doesn't explicitly state when to prefer this tool over alternatives or mention exclusions. It mentions expanded coverage, which hints at comprehensiveness, but lacks direct comparison such as 'for alternative, use X instead.'

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.

TDQS

A3.7/5.0
Disambiguation3/5

Most tools target distinct data sources, but several near-duplicates exist: get_token_approvals/get_wallet_approvals, get_defi_positions/get_wallet_positions, and get_wallet_portfolio/get_eth_balance. The descriptions do cross-reference and clarify the differences, so an agent can disambiguate with effort, but names alone are not enough.

Naming Consistency4/5

The dominant get_<noun> pattern is clear and nearly all names use lowercase snake_case with verb-first conventions. A few tools like calculate, record_predictions, http_fetch, and web_search break the get_ pattern, but the overall style remains predictable.

Tool Count2/5

34 tools is excessive for a single server, even for a broad DeFi/onchain analytics domain. The count is inflated by generic utilities such as calculate, count_text_stats, web_search, and http_fetch, plus multiple overlapping data-retrieval endpoints, making the surface hard to scan.

Completeness4/5

The set covers an unusually wide range of domain operations: prices, balances, portfolio/positions, approvals, yields, TVL, DEX quotes/volume, transactions, blocks, gas, ENS, contract reads, and risk assessments. It is view-only by design, so missing write/transaction tools is acceptable; minor gaps like address-based token pricing or transaction simulation are workaround-able.

Resources