Skip to main content
Glama

x402, crypto, defi, base, usdc, evm, security, sec-edgar, news, web-search

Multi-protocol lending health & rescue calldata builder

workflow_defi_shield
Read-onlyIdempotent

[$0.04] Trigger When: guarding a DeFi wallet against liquidation or stale approvals. Workflow Outcome: stress-tests Aave/Compound health factor (-10%/-20%) and builds unsigned repay & revoke txs. Do not use for pool yield discovery (use defi_yield_pools) or wallet PnL logs (use workflow_treasury_audit). The -10% and -20% collateral drops are fixed stress simulations, while target_health_factor sets the safety target used to size unsigned_aave_repay_tx. Live Aave/Compound RPCs, read-only non-custodial (no broadcast); requires x402 USDC or Stripe MPP (10 free lifetime calls via /api/free/*) at 30-60 req/min.

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

Input Schema

NameRequiredDescriptionDefault
chainNoEVM chain (base, ethereum, arbitrum, optimism)base
walletNo0x wallet address to inspect
target_health_factorNoTarget Aave health factor (1.1-5.0)

Output Schema

NameRequiredDescriptionDefault
chainNo
cachedNo
walletNo
aave_v3No
degradedNo
endpointNo
rpc_sourceNo
non_custodialNo
schema_versionNo
usdc_wallet_balanceNo
compound_v3_usdc_debtNo
unsigned_aave_repay_txNo
unsigned_multicall3_revoke_txNo
stale_unlimited_usdc_approvalsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the -10%/-20% drops are fixed simulations, that RPCs are live, that nothing is broadcast (non-custodial), and the payment path (x402 USDC or Stripe MPP, 10 free lifetime calls, 30-60 req/min). That is behavioral context annotations cannot express and it directly answers an agent's cost and side-effect questions.

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?

It is dense but deliberately structured with labeled segments (Trigger When, Workflow Outcome, exclusions, parameter clarification, payment/rate context), and the trigger is front-loaded. A slightly lighter treatment of pricing and rate limits would tighten it, but no sentence is filler.

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?

For a paid, multi-protocol, read-only calldata builder with an output schema, this covers trigger, exclusions, what the outputs are (unsigned txs), cost, and throughput limits. Return value details are correctly left to the output schema.

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 adds real meaning by separating the fixed -10%/-20% stress simulations from target_health_factor, which sizes the unsigned_aave_repay_tx. Chain and wallet are left to the schema, which is acceptable given its clarity.

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 names a specific verb set and resource: stress-tests Aave/Compound health factor at -10%/-20% and builds unsigned repay & revoke transactions. The title and first sentence together make the scope unambiguous and distinguish it from siblings like defi_yield_pools and workflow_treasury_audit.

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?

It gives an explicit trigger condition (guarding a wallet against liquidation or stale approvals) and explicit exclusions with named alternatives: no pool yield discovery (defi_yield_pools), no wallet PnL logs (workflow_treasury_audit). The agent has no inference left to do about when to route here.

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