Skip to main content
Glama

prepare_kamino_repay

DestructiveIdempotent

Builds a Kamino repay transaction to reduce outstanding debt in a reserve. Rejects if no debt exists, and over-repayment safely caps at owed amount.

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.
Behavior5/5

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

Beyond annotations (destructiveHint=true, idempotentHint=true), the description adds critical behavior: error on no debt, clamping on over-repayment to prevent fund loss, and nonce/blind-sign requirements. This enriches the agent's understanding of the tool's safe operation.

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 cover purpose, error handling, clamping, and prerequisites. No fluff; every sentence is essential. Front-loaded with the primary action.

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 absence of an output schema, the description explains the transaction building, error cases, and on-chain behavior completely. It also notes nonce and blind-sign requirements, covering all necessary context for safe invocation.

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?

All three parameters are described in the schema (100% coverage). The description adds extra constraints: wallet must have debt, amount is human-readable and clamped. 'Mint' has only pattern info, but overall the description enhances parameter understanding beyond the 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 specifies the exact action: 'Build a Kamino repay tx — pays down outstanding debt in the named reserve.' It clearly differentiates from siblings like prepare_kamino_borrow or prepare_kamino_supply by focusing on repayment. The verb 'repay' and resource 'debt' are specific and unambiguous.

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 explicitly states an error condition ('Refuses with a clear error if the wallet has no debt'), guiding when not to use. It also mentions prerequisites like 'DURABLE NONCE REQUIRED' and references blind-sign treatment, but does not fully detail when to use this over similar tools like prepare_kamino_supply. Still, the context is clear enough for most cases.

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