Skip to main content
Glama

prepare_kamino_withdraw

DestructiveIdempotent

Construct a Kamino withdrawal transaction to remove liquidity from an active deposit. Validates deposit presence and enforces health factor to avoid under-collateralization.

Instructions

Build a Kamino withdraw tx — pulls liquidity out of a previously-supplied reserve. Refuses with a clear error if the wallet has no deposit in the named reserve. Health-factor gated on-chain: withdraws that would leave the obligation under-collateralized for outstanding debt revert (caught by the simulation gate). DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana base58 wallet — must already have a Kamino deposit in the named reserve.
mintYesBase58 Solana mainnet address (ed25519 pubkey, 43 or 44 chars).
amountYesHuman-readable amount to withdraw. The reserve must have an active deposit from this wallet — the builder refuses with a clear error otherwise. Health-factor gated on-chain: a withdraw that would leave the obligation under-collateralized for outstanding debt reverts.
Behavior5/5

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

The description goes beyond annotations by detailing error conditions ('refuses if no deposit'), health-factor gating on-chain, and the requirement for a durable nonce. It also references the same blind-sign treatment as sibling. Annotations (readOnlyHint=false, destructiveHint=true) are consistent and the description adds substantive behavioral context.

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 three sentences with no extraneous information. Each sentence adds essential context: purpose, error condition, and special requirements. It is efficiently front-loaded and easy to parse.

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 three parameters and no output schema, the description covers the key operational aspects (prerequisites, error handling, gating). It mentions simulation gate and durable nonce, but lacks explicit mention of the output format (e.g., a transaction object). Still, it is largely adequate for a 'prepare' tool within the ecosystem.

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 parameter descriptions (e.g., wallet must have deposit, amount health-factor gated). The tool description reinforces these but adds little new information beyond what the schema already provides, so baseline score of 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?

The description clearly states 'Build a Kamino withdraw tx — pulls liquidity out of a previously-supplied reserve,' using a specific verb and resource. It distinguishes itself from sibling tools like prepare_kamino_supply and prepare_kamino_borrow by focusing on withdrawal.

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 indicates when to use this tool by mentioning prerequisites (requires an existing deposit) and constraints (health-factor gated, durable nonce required). However, it does not explicitly contrast with other withdraw tools from different protocols, but the naming convention and context provide adequate differentiation.

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