Skip to main content
Glama

airdrop_sol

Request SOL airdrop to a wallet for testing purposes on devnet or testnet networks.

Instructions

Request SOL airdrop for testing (devnet/testnet only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletNameYesName of the wallet
amountNoAmount of SOL to airdrop (default: 1)

Implementation Reference

  • The handler function that executes the airdrop_sol tool. It requests SOL airdrop from the Solana RPC for the specified wallet on devnet/testnet, converts amount to lamports, and returns the transaction signature.
    async function handleAirdropSol(args: any) { const { walletName, amount = 1 } = args; if (currentNetwork === "mainnet") { throw new Error("Airdrop is not available on mainnet"); } const wallet = wallets.get(walletName); if (!wallet) { throw new Error(`Wallet '${walletName}' not found`); } ensureConnection(); const lamports = Math.floor(amount * LAMPORTS_PER_SOL); const signature = await connection.requestAirdrop(wallet.keypair.publicKey, lamports); return { success: true, signature, amount: amount, explorerUrl: `https://explorer.solana.com/tx/${signature}?cluster=${currentNetwork}` }; }
  • The input schema definition for the airdrop_sol tool, specifying walletName as required and optional amount.
    name: "airdrop_sol", description: "Request SOL airdrop for testing (devnet/testnet only)", inputSchema: { type: "object", properties: { walletName: { type: "string", description: "Name of the wallet" }, amount: { type: "number", description: "Amount of SOL to airdrop (default: 1)" } }, required: ["walletName"] } },
  • src/index.ts:1306-1308 (registration)
    The switch case in the main CallToolRequestSchema handler that registers and dispatches airdrop_sol calls to its handler function.
    case "airdrop_sol": result = await handleAirdropSol(args); break;

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/ExpertVagabond/solana-mcp-server'

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