Skip to main content
Glama

prepare_aave_repay

DestructiveIdempotent

Build an unsigned Aave V3 repay transaction, including ERC-20 approval if needed. Pass amount as 'max' to repay full debt.

Instructions

Build an unsigned Aave V3 repay transaction. If an ERC-20 approve() is required first, it is returned as the outer tx and repay is in .next. Pass amount: "max" to repay the full debt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYes
chainNoethereum
assetYes
amountYesHuman-readable decimal amount of `asset`, NOT raw wei/base units. Example: "1.5" for 1.5 USDC, "0.01" for 0.01 ETH. Pass "max" for full-balance withdraw/repay.
approvalCapNoCap on the ERC-20 approval preceding this action. Omit for "unlimited" (standard DeFi UX — fewer follow-up approvals). Pass "exact" to approve only what this action pulls. Pass a decimal string (e.g. "500") for a specific ceiling in the asset's human units; must be ≥ the action amount, otherwise the transaction would revert.
Behavior4/5

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

Annotations give destructive and idempotent hints. The description adds behavioral context: the tool may return a multi-step transaction with approve and repay in `.next`, and the special 'max' amount. It does not disclose all behavioral traits like chain support or asset validation, but the added info is valuable.

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?

The description is extremely concise with two sentences, no redundant information. Every sentence adds critical context: one explains the core action and multi-step behavior, the other clarifies the 'max' parameter usage.

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 DeFi repay tool with no output schema, the description covers the multi-step nature and the 'max' feature. It lacks details on supported chains (only in schema), return structure, and prerequisites, but given brevity it is fairly complete.

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 40% with descriptions for amount and approvalCap in schema. The description adds semantic value by clarifying that 'max' can be used for amount. The other parameters (wallet, chain, asset) are self-explanatory but not elaborated. Overall, marginal improvement beyond schema.

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 builds an unsigned Aave V3 repay transaction. It distinguishes from sibling tools like prepare_aave_borrow and prepare_aave_supply by specifying 'repay' and uses a specific verb 'Build' with a clear resource 'Aave V3 repay transaction'.

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?

The description provides useful usage guidance: it explains that an approve() may be required and returned as outer tx, and that 'max' can be passed for full repayment. However, it does not explicitly outline prerequisites (e.g., existing debt) or when to choose repay over other Aave actions, though the context is implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/vaultpilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server