Skip to main content
Glama

fund_testnet

Fund Algorand testnet accounts using the official faucet to obtain test tokens for development and testing purposes.

Instructions

Fund an Algorand testnet account using the official faucet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAlgorand testnet address to fund

Implementation Reference

  • Handler for the 'fund_testnet' tool. Parses input arguments using Zod schema, dynamically imports node-fetch, sends POST to Algorand testnet faucet API to fund the address, handles response or error.
    case 'fund_testnet': { const parsed = FundTestnetArgsSchema.parse(args); try { // Use node-fetch for HTTP requests const fetch: typeof import('node-fetch') = (await import('node-fetch')).default; const faucetUrl = `https://bank.testnet.algorand.network/api/v2/accounts/${parsed.address}`; const response = await fetch(faucetUrl, { method: 'POST' }); if (!response.ok) { throw new Error(`Faucet request failed: ${response.statusText}`); } const result = await response.json(); return { content: [ { type: 'text', text: `Faucet request sent!\nStatus: ${result.message || 'Success'}\nCheck your account balance in a few seconds.`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Faucet funding failed: ${error}`, }, ], isError: true, }; } }
  • Zod schema definition for 'fund_testnet' tool arguments: requires a string 'address'.
    // FundTestnet tool schema const FundTestnetArgsSchema = z.object({ address: z.string(), });
  • src/index.ts:142-155 (registration)
    Tool registration in the TOOLS array, defining name, description, and inputSchema matching the Zod schema.
    { name: 'fund_testnet', description: 'Fund an Algorand testnet account using the official faucet', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Algorand testnet address to fund', }, }, required: ['address'], }, },

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/Jake-loranger/algorand-mcp-server'

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