buy_coin
Builds a buy (or sell) of a pump.fun coin for the agent's own wallet: an unsigned Solana transaction (base64) with the pump.fun curve or PumpSwap trade and pumpdata's 0.4% fee inside it. pumpdata never holds a key: sign it with the wallet, then send it yourself or with send_tx. Expires in about a minute. For: buy this coin, ape 0.2 SOL, sell all.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mint": "<mint>",
"wallet": "<wallet>"
},
"name": "buy_coin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sol | No | SOL to spend on a buy (0.001 to 100) | |
| mint | Yes | the coin's mint (base58) | |
| side | No | buy (default) or sell | |
| tokens | No | on a sell: raw token units, or "all" | |
| wallet | Yes | the address that signs and pays | |
| slippage_bps | No | default 1000 (10%) |