Skip to main content
Glama

write.account.repay

Idempotent

Repay debt to an Arcadia lending pool using wallet tokens. Requires ERC20 allowance; approve the pool first 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

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYes
transactionYes
predicted_account_addressNo
Behavior4/5

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

Annotations already indicate idempotentHint=true and readOnlyHint=false. The description adds critical behavioral context: requires ERC20 allowance, implying an on-chain interaction that may fail without prior approval. It does not repeat annotation information, but adds value.

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?

Three sentences, no fluff. The most critical information (purpose, alternative, prerequisites) is front-loaded. Every sentence earns its place.

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?

Given the complexity of DeFi repayment, the description covers purpose, prerequisites, alternatives, and links to related tools for checking state. With an output schema present, return values need not be explained. The description is self-sufficient for correct agent invocation.

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 100%, so the schema already documents each parameter thoroughly. The description adds no new parameter-level details but contextualizes the amount as 'raw units, or max_uint256' and provides example addresses for pool_address, which is helpful but not beyond baseline for high coverage.

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 'Repay debt to an Arcadia lending pool using tokens from the wallet', specifying the verb and resource. It directly distinguishes from the sibling tool write.account.deleverage by contrasting token repayment vs. collateral repayment.

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?

The description explicitly tells when to use this tool (when wallet tokens are available) and when not to (use deleverage for collateral). It also provides prerequisite steps: check allowance with read.wallet.allowances, approve if needed with write.wallet.approve, and check outstanding debt with read.account.info.

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/arcadia-finance/mcp-server'

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