Tokens/token_account
Where to send a token
$0.01per call after 25 free a dayFinds the token account (ATA) for a wallet and token with the token's real program, says if it exists, and prices creating it.
Run before sending a token. Tokens go to the recipient's token account, not their wallet, and models can't work that address out.
Saves money. Works out the token account with the token's real program and prices creating it, so tokens aren't sent to a made-up or wrong-program address.
Call it
| Transport | How |
|---|---|
| HTTP | POST /api/tools/token_account with a JSON body of the inputs below. |
| MCP | tools/call with name token_account on /mcp. |
Inputs
| Name | What it's looking for | Where to get it |
|---|---|---|
walletstring (base58 address), required | The wallet that will own it (usually the recipient). | The recipient's wallet address. |
tokenstring (token address), required | The token's address. | From find_token or tokens. Not a ticker. |
network"mainnet-beta" | "devnet", optional | Default "mainnet-beta" (real money). | "devnet" only for test wallets. |
Returned fields
Every field the tool returns, what it is, and exactly how it's worked out.
| Field | What it is | How it's worked out |
|---|---|---|
addressstring | The recipient's token account for this token. Send the tokens here. | getAssociatedTokenAddressSync(token, wallet) with the token's own program. |
token_program"spl-token" | "token-2022" | The token program the transfer must use. | The program that owns the token. |
existsboolean | Whether the account already exists on chain. | Looked up on chain. |
balancestring | null | What the account holds now, when it exists. | Token amount with the token's decimals. |
decimalsnumber | The token's decimals. | From the token. |
create_cost_lamportsstring | null | The SOL deposit (in lamports) to create the account when it doesn't exist. You get it back if the account is closed later. | getMinimumBalanceForRentExemption for the account size, counting the token's Token-2022 extensions. |
create_cost_solstring | null | The same deposit in SOL. | create_cost_lamports / 10^9. |
owner_is_programboolean | True when the wallet is a program-derived address, not a normal wallet. Fine for protocols, odd for people. | The address is off the ed25519 curve. |