Skip to main content
Glama

Quote repaying debt from collateral (v4)

get_repay_with_supply_quote
Read-only

v4 only. Quote paying down a borrow using supplied collateral, atomically and without the funds leaving Aave. 'debtPosition' is the borrow to reduce, a positionItemId from get_position_items with side=borrow whose 'quotableAs' lists repayDebt; 'repayWithReserve' is the reserveId of the collateral that pays for it, from get_markets with 'quotableAs' listing repayWith, on the same spoke. Use this instead of withdraw-swap-repay by hand: it is one atomic step, so the health factor never dips in between. The quoteId feeds prepare_order. Nothing is committed until the user signs, so state the plan rather than asking permission to quote it.

Input Schema

NameRequiredDescriptionDefault
userYesWallet address (0x, 40 hex).
amountYesAmount of debt to repay, in main units, e.g. '100.5'.
versionNoOptional, and only 'v4': this tool exists on v4 only.
slippagePctNoOptional max slippage as a percent string, e.g. '0.5'. Omit to accept the backend suggestion.
debtPositionYespositionItemId of the borrow to reduce (get_position_items side=borrow).
repayWithReserveYesreserveId of the collateral that pays for it (from get_markets).

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?

Annotations declare readOnlyHint=true and destructiveHint=false, and the description is consistent while adding real context: the operation is atomic, the health factor never dips in between, and nothing is committed until the user signs. It even sets the expected agent behavior ('state the plan rather than asking permission to quote it'), which annotations cannot express.

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 version constraint is correctly front-loaded and every sentence carries information, but the middle sentences are dense with chained prerequisites and would benefit from clearer separation between id-discovery and invocation guidance. No filler, though.

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 quote tool with no output schema, it covers the workflow handoff (quoteId -> prepare_order) and the non-commitment guarantee, which is what an agent needs to act. It does not describe what the returned quote contains (prices, slippage application, resulting health factor), a minor gap given there is no output schema to fall back on.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline would be 3, but the description goes further by identifying the source tool and filter for each id (positionItemId from get_position_items with side=borrow and quotableAs repayDebt; reserveId from get_markets with quotableAs repayWith) and the 'same spoke' constraint. That is meaning the schema does not carry.

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?

Opens with a specific verb and resource ('Quote paying down a borrow using supplied collateral') plus scope and a distinguishing mechanism ('atomically and without the funds leaving Aave'). An agent can separate it from get_swap_quote, get_position_swap_quote and preview_action without opening any schema.

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?

Explicitly names the alternative it replaces ('Use this instead of withdraw-swap-repay by hand') and the reason (single atomic step, health factor never dips). It also documents prerequisites for each id (get_position_items side=borrow whose quotableAs lists repayDebt; get_markets quotableAs listing repayWith, same spoke) and the downstream step ('quoteId feeds prepare_order').

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