Skip to main content
Glama

aave_flash_loan

Construct a multi-asset Aave V3 flash loan transaction by defining the receiver contract, tokens, amounts, interest rate modes, and debt assignment for same-transaction repayment or variable debt.

Instructions

Build a multi-asset flash loan transaction. The receiver contract must implement IFlashLoanReceiver. interestRateModes: 0 = repay in same tx, 2 = open variable debt.

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": {
      "chain": "<chain>",
      "receiverAddress": "<receiverAddress>",
      "assets": "<assets>",
      "amounts": "<amounts>",
      "interestRateModes": "<interestRateModes>",
      "onBehalfOf": "<onBehalfOf>"
    },
    "name": "aave_flash_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesTarget chain
assetsYesArray of token addresses to borrow
paramsNoArbitrary bytes to pass to the receiver callback (hex-encoded)0x
amountsYesArray of amounts in human-readable units, matching assets order
onBehalfOfYesAddress that will incur debt if interestRateMode != 0
receiverAddressYesContract that will receive the flash loan and execute the callback
interestRateModesYesPer-asset: 0 = no debt (repay same tx), 2 = open variable debt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses a hard prerequisite (the receiver must implement IFlashLoanReceiver) and explains the interestRateMode semantics, but it never says whether this returns an unsigned transaction to sign or executes on-chain, nor does it mention the flash loan premium/fee that the receiver must repay.

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?

Three short sentences, front-loaded with the core action, then the prerequisite, then the key enum semantics. Nothing is padded, though the fragment-like style leaves the behavioral gaps noted elsewhere.

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 7-parameter tool with full schema coverage and no output schema, the description covers purpose, a critical prerequisite, and the trickiest enum. What is missing — the return shape of the 'built' transaction and fee obligations — is a real but modest gap.

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 description coverage is 100%, so every parameter is already documented, including the per-asset interestRateModes. The description restates the mode mapping without adding format, ordering, or validation detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Build a multi-asset flash loan transaction.' The word 'multi-asset' implicitly separates it from aave_flash_loan_simple, but the sibling is never named, so the agent must infer the distinction.

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 'multi-asset' framing hints that a single-asset path exists elsewhere, and the IFlashLoanReceiver requirement gives a precondition, but there is no explicit statement of when to choose this tool over aave_flash_loan_simple or which chains/asset counts are appropriate.

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