Skip to main content
Glama

send_payment

Send Algo payment transactions on the Algorand blockchain. Requires a mnemonic phrase, recipient address, and amount in microAlgos. Optional note field for transaction details.

Instructions

Send Algo payment transaction (WARNING: Requires mnemonic phrase)

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in microAlgos (1 Algo = 1,000,000 microAlgos)
mnemonicYesSender account mnemonic phrase (25 words)
noteNoOptional transaction note
toAddressYesRecipient address

Input Schema (JSON Schema)

{ "properties": { "amount": { "description": "Amount in microAlgos (1 Algo = 1,000,000 microAlgos)", "type": "number" }, "mnemonic": { "description": "Sender account mnemonic phrase (25 words)", "type": "string" }, "note": { "description": "Optional transaction note", "type": "string" }, "toAddress": { "description": "Recipient address", "type": "string" } }, "required": [ "mnemonic", "toAddress", "amount" ], "type": "object" }

Implementation Reference

  • The core handler function that implements the send_payment tool logic: imports account from mnemonic, builds payment transaction, signs it, submits to network, and waits for confirmation.
    async sendPayment( fromMnemonic: string, toAddress: string, amount: number, note?: string ) { try { const fromAccount = this.importAccountFromMnemonic(fromMnemonic); const suggestedParams = await this.algodClient.getTransactionParams().do(); const txnParams: any = { sender: fromAccount.addr, receiver: toAddress, amount: amount, suggestedParams, }; if (note) { txnParams.note = new TextEncoder().encode(note); } const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txnParams); const signedTxn = txn.signTxn(fromAccount.sk); const response = await this.algodClient.sendRawTransaction(signedTxn).do(); const txId = response.txid || txn.txID(); // Wait for confirmation const result = await algosdk.waitForConfirmation(this.algodClient, txId, 4); return { txId, confirmedRound: result.confirmedRound, }; } catch (error) { throw new Error(`Payment failed: ${error}`); } }
  • MCP server handler that parses input arguments using Zod schema and delegates to AlgorandService.sendPayment, formats the response.
    case 'send_payment': { const parsed = SendPaymentArgsSchema.parse(args); try { const result = await algorandService.sendPayment( parsed.mnemonic, parsed.toAddress, parsed.amount, parsed.note ); return { content: [ { type: 'text', text: `Payment Successful!\nTransaction ID: ${result.txId}\nConfirmed in Round: ${result.confirmedRound}\nAmount: ${parsed.amount / 1000000} ALGO`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Payment failed: ${error}`, }, ], isError: true, }; } }
  • src/index.ts:179-203 (registration)
    Tool registration in the TOOLS array with name, description, and JSON input schema for MCP tool discovery.
    { name: 'send_payment', description: 'Send Algo payment transaction (WARNING: Requires mnemonic phrase)', inputSchema: { type: 'object', properties: { mnemonic: { type: 'string', description: 'Sender account mnemonic phrase (25 words)', }, toAddress: { type: 'string', description: 'Recipient address', }, amount: { type: 'number', description: 'Amount in microAlgos (1 Algo = 1,000,000 microAlgos)', }, note: { type: 'string', description: 'Optional transaction note', }, }, required: ['mnemonic', 'toAddress', 'amount'], },
  • Zod schema used for runtime validation of send_payment tool input arguments in the MCP handler.
    const SendPaymentArgsSchema = z.object({ mnemonic: z.string(), toAddress: z.string(), amount: z.number(), note: z.string().optional(), });

Other Tools

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

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