Skip to main content
Glama

prepare_kamino_repay

DestructiveIdempotent

Prepare a transaction to repay outstanding debt in a Kamino reserve. Prevents over-repayment by clamping at debt amount, and rejects if no debt exists.

Instructions

Build a Kamino repay tx — pays down outstanding debt in the named reserve. Refuses with a clear error if the wallet has no debt in the reserve. The on-chain program clamps repayment at outstanding debt, so over-repaying just doesn't burn the excess (no funds lost). DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana base58 wallet — must already have outstanding debt in the named reserve.
mintYesBase58 Solana mainnet address (ed25519 pubkey, 43 or 44 chars).
amountYesHuman-readable amount to repay. The on-chain program clamps repayment at outstanding debt; over-repaying just doesn't burn the excess (no funds lost). Refuses with a clear error if the wallet has no debt in the reserve.
Behavior4/5

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

Annotations already mark destructiveHint=true and idempotentHint=true. The description adds valuable behavioral details: the refusal on no debt, the clamping behavior to prevent over-repay loss, and the durable nonce requirement. This goes beyond what annotations provide, though it lacks permission requirements or return value details.

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 concise, consisting of three clear sentences with no superfluous text. The purpose is front-loaded, followed by error handling, clamping behavior, and a requirement note. Every sentence serves a distinct purpose.

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?

Given the tool simplicity (3 params, no output schema) and the presence of many sibling tools, the description adequately covers purpose, error cases, behavioral quirks, and a requirement. It does not mention the return value (expected transaction object), but that is a common pattern for 'prepare' tools and not critical.

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

Parameters4/5

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

Schema coverage is 100%, providing baseline parameter info. The description adds context: 'wallet must have debt', 'mint' is the reserve, and 'amount' is human-readable with clamping behavior explained. This enhances understanding beyond the schema alone.

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 verb 'Build' and the resource 'Kamino repay tx — pays down outstanding debt in the named reserve.' This directly distinguishes it from sibling tools like prepare_kamino_supply, prepare_kamino_borrow, etc., by specifying the action and the protocol.

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 description provides usage context by stating that refusing occurs if the wallet has no debt and that over-repaying is safe. It also notes the requirement for a durable nonce and blind-sign treatment. However, it does not explicitly indicate when NOT to use this tool or mention alternatives (e.g., prepare_aave_repay) for different protocols.

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/recon-crypto-mcp'

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