Skip to main content
Glama

prepare_kamino_borrow

DestructiveIdempotent

Borrow assets from a Kamino reserve using existing collateral. Requires initialized Kamino account and valid market listing, with on-chain LTV protection.

Instructions

Build a Kamino borrow tx — pulls liquidity from a reserve as debt against the obligation's existing collateral. Refuses if the wallet hasn't run prepare_kamino_init_user; refuses if the mint isn't listed on Kamino's main market. On-chain LTV gate: borrow reverts if it would push the obligation over the reserve's borrowLimit (the simulation gate catches this before signing). DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana base58 wallet — must already have Kamino userMetadata + obligation.
mintYesBase58 SPL mint of the asset to borrow against the obligation's collateral.
amountYesHuman-readable amount to borrow (e.g. "100" for 100 USDC). Decimals are resolved from the reserve's mint metadata. The on-chain program enforces the borrow LTV gate; if the borrow would push the obligation over the liquidation limit, the tx reverts (caught by the simulation gate).
Behavior5/5

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

Annotations provide destructiveHint and idempotentHint, but description adds substantial context: 'On-chain LTV gate: borrow reverts if... simulation gate catches this before signing,' and 'DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.' No contradiction with annotations.

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 concise sentences: purpose, two preconditions, on-chain behavior, and additional requirements. Every sentence adds value, no fluff.

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?

Thorough on preconditions, behavior, and signing requirements. Lacks explicit statement about output format (transaction bytes), but implied by context and blind-sign mention. Nearly complete.

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% with detailed descriptions for each parameter. The description does not add new semantics beyond what schema provides, but it reinforces context. 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?

Description clearly states 'Build a Kamino borrow tx — pulls liquidity from a reserve as debt against the obligation's existing collateral,' specifying verb (build/prepare) and resource (Kamino borrow tx), and differentiates from sibling tools like prepare_kamino_supply and prepare_kamino_withdraw.

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?

Explicitly states preconditions: 'Refuses if the wallet hasn't run prepare_kamino_init_user; refuses if the mint isn't listed on Kamino's main market,' and mentions simulation gate. Does not explicitly state when not to use, but context is clear.

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