Skip to main content
Glama

request_devnet_airdrop

Get free SOL tokens on Solana's devnet test network to pay for transaction fees during development and testing.

Instructions

Request free SOL on devnet for testing. Use this to get SOL for transaction fees.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoAmount of SOL to request (max 2)

Implementation Reference

  • Core implementation of the request_devnet_airdrop tool logic: requests SOL airdrop on Solana devnet using the wallet's connection and keypair.
    async requestAirdrop(amount: number = 1): Promise<{ success: boolean; amount: number; signature?: string }> {
      try {
        const signature = await this.connection.requestAirdrop(
          this.keypair.publicKey,
          amount * LAMPORTS_PER_SOL
        );
    
        await this.connection.confirmTransaction(signature);
    
        return {
          success: true,
          amount,
          signature,
        };
      } catch (error: any) {
        // Rate limited or other error
        throw new Error(`Airdrop failed: ${error.message}. Try again later or use https://faucet.solana.com`);
      }
    }
  • MCP tool dispatcher handler for 'request_devnet_airdrop': parses input arguments, enforces max amount, delegates to wallet.requestAirdrop, and formats response.
    case "request_devnet_airdrop": {
      const { amount = 1 } = args as { amount?: number };
      const result = await wallet.requestAirdrop(Math.min(amount, 2));
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'request_devnet_airdrop' tool, specifying optional 'amount' parameter.
    {
      name: "request_devnet_airdrop",
      description: "Request free SOL on devnet for testing. Use this to get SOL for transaction fees.",
      inputSchema: {
        type: "object",
        properties: {
          amount: {
            type: "number",
            description: "Amount of SOL to request (max 2)",
          },
        },
        required: [],
      },
    },
  • src/index.ts:24-93 (registration)
    Registration of all tools including 'request_devnet_airdrop' in the TOOLS array used by MCP server.
    const TOOLS: Tool[] = [
      {
        name: "get_wallet_address",
        description: "Get the agent's Solana wallet address. Use this to receive funds or share your address.",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_balance",
        description: "Check the USDC and SOL balance of the agent wallet. Returns balances on Solana devnet.",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "send_usdc",
        description: "Send USDC to another Solana address. This executes a real transaction on Solana devnet.",
        inputSchema: {
          type: "object",
          properties: {
            recipient: {
              type: "string",
              description: "The Solana address to send USDC to",
            },
            amount: {
              type: "number",
              description: "Amount of USDC to send (e.g., 5.00 for $5)",
            },
            memo: {
              type: "string",
              description: "Optional memo/note for the transaction",
            },
          },
          required: ["recipient", "amount"],
        },
      },
      {
        name: "get_recent_transactions",
        description: "Get recent transactions for the agent wallet.",
        inputSchema: {
          type: "object",
          properties: {
            limit: {
              type: "number",
              description: "Maximum number of transactions to return (default: 10)",
            },
          },
          required: [],
        },
      },
      {
        name: "request_devnet_airdrop",
        description: "Request free SOL on devnet for testing. Use this to get SOL for transaction fees.",
        inputSchema: {
          type: "object",
          properties: {
            amount: {
              type: "number",
              description: "Amount of SOL to request (max 2)",
            },
          },
          required: [],
        },
      },
    ];
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool is for 'free SOL on devnet' and 'testing', which implies it's non-destructive and safe for testing, but lacks details on rate limits, authentication needs, or what happens if the request fails. This leaves gaps in understanding operational constraints.

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

Conciseness5/5

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

The description is front-loaded and highly concise, consisting of two clear sentences that directly state the tool's purpose and usage without any wasted words. Every sentence earns its place by providing essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter) and no output schema, the description adequately covers the basic purpose and usage. However, without annotations or output details, it lacks information on behavioral traits like success/failure responses or limitations, making it minimally complete but with gaps for a testing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'amount' documented as 'Amount of SOL to request (max 2)'. The description adds no additional parameter semantics beyond this, such as default values or usage examples. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 specific action ('Request free SOL on devnet') and resource ('SOL'), distinguishing it from siblings like get_balance or send_usdc by focusing on obtaining test funds rather than querying or sending transactions. It explicitly mentions the purpose 'for testing' and 'for transaction fees', making the intent unambiguous.

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?

The description provides clear context for when to use this tool ('for testing' and 'to get SOL for transaction fees'), which implicitly differentiates it from siblings used for real transactions or queries. However, it does not explicitly state when not to use it (e.g., for mainnet) or name alternatives, keeping it from a perfect score.

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/noah-ing/agent-wallet-mcp'

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