Skip to main content
Glama

Lending health factor and liquidation risk for a wallet: Aave v3 and Compound v3 on Base, Ethereum, Arbitrum

defi_health

Use when an agent must check if a wallet's loans are near liquidation. Input: address, optional chain (base, ethereum, arbitrum, all). Output: JSON per chain Aave v3 collateral, debt, borrowing power, LTV, health factor and liquidation distance %; Compound v3 supplied/borrowed base asset and isLiquidatable; summary with the lowest health factor. Read from contracts. Example: ?address=0x6246eee0355Dd7A93C888fE59e1151388A0cC5a1 Price: $0.003 USDC (Base or Solana) via x402.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>"
    },
    "name": "defi_health"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain to check (default all)
addressYesEVM wallet (EIP-55 checksum if mixed case). Bad address → 400 before payment (not charged)

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?

With no annotations, the description carries the burden and does well: it states the data source ('Read from contracts'), discloses per-chain output structure, and adds operational facts an agent would otherwise have to discover — the $0.003 USDC x402 price and payment rails. It does not state freshness/caching or what happens on RPC failure, so it stops short of full disclosure.

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 trigger sentence is front-loaded and the input/output/example/pricing blocks are easy to scan. The telegraphic style packs a lot into a few lines, though the trailing pricing sentence sits awkwardly at the end and would read better earlier.

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?

There is no output schema, yet the description enumerates the returned fields per protocol and the cross-chain summary with the lowest health factor, which is enough for an agent to plan parsing. Minor omissions remain — value formats and units for health factor and LTV, and behavior when a wallet has no positions.

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 coverage is 100%, so the baseline is 3, but the description goes further by enumerating the legal chain values (base, ethereum, arbitrum, all) — an enum the schema does not declare — and supplies a concrete example address. That materially reduces the chance of an invalid call.

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 gives a specific verb and resource — check whether a wallet's loans are near liquidation — and names the exact protocols and chains covered (Aave v3 and Compound v3 on Base, Ethereum, Arbitrum). No sibling tool covers lending health, and the title/description pairing makes the boundary 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 opens with an explicit trigger condition ('Use when an agent must check if a wallet's loans are near liquidation'), which is exactly the routing signal an agent needs. It does not name a when-not case or a complementary tool, but there is no close sibling to disambiguate against, so the gap is minor.

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