Skip to main content
Glama
staccDOTsol

fomox402 — Last-Bidder-Wins on Solana

withdraw

Sweep funds out of the calling agent's Privy wallet to any Solana address. Supports native SOL (lamports) and any SPL/Token-2022 mint. Set amountRaw='all' to drain the full balance, leaving a 5000-lamport reserve for SOL.

Instructions

Sweep funds out of the calling agent's Privy wallet to any address.

WHAT IT DOES: builds and signs a Solana transfer (native SOL or any SPL/Token-2022 mint) from the agent's broker-managed wallet to to. Broker submits the tx; on confirmation it returns the signature.

WHEN TO USE:

  • Retiring an agent and reclaiming its funds

  • Cashing out winnings to a long-term wallet

  • Routing $fomox402 to an exchange / Jupiter / etc.

ASSET PARAMETER:

  • 'sol' → native SOL, in lamports (amountRaw='all' keeps a 5000-lamport reserve so the transfer tx itself can pay its own fee)

  • any base58 mint pubkey → that token's ATA. amountRaw='all' sweeps the full balance (closes ATA if balance hits 0 after sweep). Token-2022 mints are auto-detected by the broker.

AUTHORITY: the api_key. Same auth model as place_bid — anyone with the key can move funds. Lose the key = lose the wallet. Withdraw is the intentional escape hatch.

RETURNS: { tx (Solana sig), to, asset, amountRaw_sent, balance_after }.

FAILURE MODES: withdraw_failed (insufficient_balance) — wallet doesn't have that much withdraw_failed (invalid_destination) — to isn't a valid pubkey withdraw_failed (rpc) — Solana RPC, retry

RELATED: get_me (check balances first), topup (the opposite — bring funds in).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination Solana pubkey (base58, 32–44 chars). Must be a wallet address; for SPL transfers the broker derives the destination ATA automatically.
assetYes'sol' for native SOL, or a base58 mint pubkey for any SPL/Token-2022 token. Special-case: 'fomo' is also accepted as an alias for the $fomox402 mint.
amountRawNoAmount to sweep, in raw atomic units (string for bigint safety), or 'all' to sweep the full available balance. Default 'all'. For SOL, 'all' keeps a 5000-lamport reserve to cover the tx fee.
api_keyNoBearer api_key (or env). The wallet behind this key is the source of funds.
Behavior5/5

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

With no annotations, the description carries full behavioral transparency. It details that it builds and signs a Solana transfer, that the broker submits the tx, the return format (signature), authority model (api_key risk), failure modes (three specific errors), and special behavior like keeping a 5000-lamport reserve for SOL. This is comprehensive.

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?

The description is well-structured with sections (WHAT IT DOES, WHEN TO USE, etc.) and front-loaded with a one-line summary. Every sentence adds value, though the length is slightly more than minimal. The structure aids readability.

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 complexity (4 parameters, no output schema, no annotations), the description covers all necessary aspects: purpose, usage, parameter details, return format, failure modes, and related tools. It leaves no gaps for an agent to misinterpret.

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%, so baseline is 3. The description adds significant context: for 'asset' it explains 'sol' vs mint pubkey and the 'fomo' alias; for 'amountRaw' it clarifies 'all' behavior and reserve; for 'to' it mentions automatic ATA derivation for SPL. This enriches the schema descriptions.

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 tool's purpose: 'Sweep funds out of the calling agent's Privy wallet to any address.' It uses a specific verb ('sweep') and resource, and distinguishes from siblings like 'topup' (opposite) and 'get_me' (balance check). Explicit usage scenarios (retiring agent, cashing out, routing) further clarify purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a dedicated 'WHEN TO USE' section with three bullet points (retiring an agent, cashing out, routing tokens). It also mentions related tools ('get_me' for checking balances, 'topup' for bringing funds in), providing clear guidance on when to use this tool vs alternatives.

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/staccDOTsol/staccbot-tg'

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