Skip to main content
Glama

write_account_repay

Idempotent

Repays debt to an Arcadia lending pool using wallet tokens and an existing ERC20 allowance. Check allowance and outstanding debt first, then approve the pool if needed.

Instructions

Repay debt to an Arcadia lending pool using tokens from the wallet (requires ERC20 allowance). To repay using account collateral instead (no wallet tokens needed), use write_account_deleverage. Check allowance first (read_wallet_allowances), then approve the pool if needed (write_wallet_approve). Check outstanding debt with read_account_info.

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in raw units, or 'max_uint256' to repay all debt in full
chain_idNoChain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
pool_addressYesLending pool address. Base: LP_WETH=0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2, LP_USDC=0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1, LP_CBBTC=0xa37E9b4369dc20940009030BfbC2088F09645e3B
account_addressYesArcadia account address with debt

Output Schema

NameRequiredDescriptionDefault
descriptionYes
transactionYes
predicted_account_addressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false; the description adds the ERC20 allowance prerequisite and the wallet-vs-collateral funding distinction, which are real behavioral facts. The only remaining gap is whether this submits or merely builds an unsigned transaction, though the annotation title 'Build Repay Transaction' already signals that.

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?

Four short sentences, each front-loading a distinct decision: funding source, alternative tool, approval workflow, and debt lookup. Zero filler.

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?

With an output schema present and four fully described parameters, the description covers what an agent needs to call this correctly, including the allowance prerequisite that would otherwise cause a failed call. Only the build-vs-submit distinction is left implicit.

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%, and each parameter is documented with examples (pool addresses, chain IDs, raw units and 'max_uint256'). The description adds nothing about parameter format or defaults, so the baseline 3 is appropriate.

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?

States a specific verb (repay debt) plus resource (Arcadia lending pool) and the funding source (wallet tokens), which immediately separates it from the collateral-based sibling. An agent can identify the correct tool without opening either 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 (write_account_deleverage) and the condition that selects it, and lays out the prerequisite sequence: read_wallet_allowances, then write_wallet_approve if needed, with read_account_info for debt. This is a full when/when-not/alternatives routing guide.

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