Skip to main content
Glama

prepare_native_stake_withdraw

DestructiveIdempotent

Build unsigned native-stake withdraw transaction to move SOL from an inactive stake account back to the wallet. Supports full withdrawal (closes account) or partial withdrawal (leaves account open).

Instructions

Build an unsigned native-stake withdraw tx. Pulls amountSol SOL (or 'max' for the full lamport balance) from an inactive stake account back into the wallet. 'max' closes the account and reclaims the rent-exempt seed; partial-withdraw leaves the account open. Stake MUST be inactive (one full epoch after deactivate) — on-chain reverts otherwise; the simulation gate catches it. DURABLE NONCE REQUIRED + same Ledger blind-sign treatment as prepare_native_stake_delegate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana wallet — must be the stake account's withdrawer authority + receives the SOL. (For stakes created via prepare_native_stake_delegate, wallet === staker === withdrawer; no authority handoff is supported in this server.)
stakeAccountYesBase58 stake account address to withdraw from. Stake must be inactive (one full epoch after prepare_native_stake_deactivate). On-chain reverts if the stake is still cooling down — the simulation gate catches it.
amountSolYesHuman-readable SOL amount to withdraw (e.g. "1.5"), OR the literal string "max" to withdraw the full lamport balance (closes the stake account and reclaims the rent-exempt seed). Partial withdraws leave the account open with a smaller balance.
Behavior4/5

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

Adds value beyond annotations by describing partial vs full withdrawal effects, simulation gate, and nonce requirement. No contradiction with annotations (destructiveHint=true for 'max', idempotentHint for building tx).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with purpose. All sentences add value, though could be slightly more concise. No filler.

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?

Covers all essential behavioral aspects: purpose, prerequisites, effects on account, nonce requirement, and safety (simulation gate). Missing explicit mention of output format, but no output schema exists so not required.

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%, and description adds extra context for amountSol (example, 'max' behavior, partial vs full). Reinforces parameter descriptions without redundancy.

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 it builds an unsigned native-stake withdraw tx from an inactive stake account, explaining 'max' closes the account and partial withdraw leaves it open. Distinguishes from siblings like deactivate and delegate.

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 the stake must be inactive and a durable nonce is required, providing clear context for when to use. Mentions similar Ledger treatment as a sibling, but does not explicitly list alternatives or when-not scenarios.

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