Skip to main content
Glama
Jake-loranger

Algorand MCP Server

transfer_asset

Transfer Algorand Standard Assets between accounts using mnemonic authentication, asset IDs, and specified amounts on the Algorand blockchain.

Instructions

Transfer an Algorand Standard Asset

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromMnemonicYesSender account mnemonic phrase (25 words)
toAddressYesRecipient address
assetIdYesAsset ID to transfer
amountYesAmount to transfer
noteNoOptional transaction note

Implementation Reference

  • Core handler function that implements the asset transfer logic using algosdk: imports account, creates asset transfer transaction, signs it, sends it, and waits for confirmation.
    async transferAsset(
        fromMnemonic: string,
        toAddress: string,
        assetId: number,
        amount: number,
        note?: string
    ) {
        try {
            const fromAccount = this.importAccountFromMnemonic(fromMnemonic);
            const suggestedParams = await this.algodClient.getTransactionParams().do();
    
            const transferParams: any = {
                sender: fromAccount.addr,
                receiver: toAddress,
                amount,
                assetIndex: assetId,
                suggestedParams,
            };
    
            if (note) {
                transferParams.note = new TextEncoder().encode(note);
            }
    
            const txn = algosdk.makeAssetTransferTxnWithSuggestedParamsFromObject(transferParams);
    
            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(`Asset transfer failed: ${error}`);
        }
    }
  • Zod schema for validating input arguments to the transfer_asset tool.
    const TransferAssetArgsSchema = z.object({
        fromMnemonic: z.string(),
        toAddress: z.string(),
        assetId: z.number(),
        amount: z.number(),
        note: z.string().optional(),
    });
  • src/index.ts:266-294 (registration)
    Tool registration in the TOOLS array, defining name, description, and input schema for MCP server.
        name: 'transfer_asset',
        description: 'Transfer an Algorand Standard Asset',
        inputSchema: {
            type: 'object',
            properties: {
                fromMnemonic: {
                    type: 'string',
                    description: 'Sender account mnemonic phrase (25 words)',
                },
                toAddress: {
                    type: 'string',
                    description: 'Recipient address',
                },
                assetId: {
                    type: 'number',
                    description: 'Asset ID to transfer',
                },
                amount: {
                    type: 'number',
                    description: 'Amount to transfer',
                },
                note: {
                    type: 'string',
                    description: 'Optional transaction note',
                },
            },
            required: ['fromMnemonic', 'toAddress', 'assetId', 'amount'],
        },
    },
  • MCP server request handler for call_tool that parses arguments with schema and delegates execution to AlgorandService.transferAsset, formats response.
    case 'transfer_asset': {
        const parsed = TransferAssetArgsSchema.parse(args);
        try {
            const result = await algorandService.transferAsset(
                parsed.fromMnemonic,
                parsed.toAddress,
                parsed.assetId,
                parsed.amount,
                parsed.note
            );
            return {
                content: [
                    {
                        type: 'text',
                        text: `Asset Transfer Successful!\nAsset ID: ${parsed.assetId}\nAmount: ${parsed.amount}\nTransaction ID: ${result.txId}\nConfirmed in Round: ${result.confirmedRound}`,
                    },
                ],
            };
        } catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Asset transfer failed: ${error}`,
                    },
                ],
                isError: true,
            };
        }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Transfer' which implies a write/mutation operation, but doesn't mention critical behaviors like whether this is irreversible, requires network fees, has rate limits, or returns transaction confirmation details. The description is minimal and lacks operational context.

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 extremely concise - a single sentence that directly states the tool's purpose. There's no wasted words or unnecessary elaboration. It's front-loaded with the core functionality.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after transfer (success/failure indicators), doesn't mention network implications, and provides no context about the Algorand ecosystem. Given the complexity of asset transfers, more operational detail is needed.

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 schema has 100% description coverage, so all parameters are documented in the schema itself. The description doesn't add any additional meaning about parameters beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Transfer') and resource ('Algorand Standard Asset'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'send_payment' or 'opt_in_to_asset', which appear to handle related but different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'send_payment' (which might handle Algo currency transfers) or 'opt_in_to_asset' (which might prepare accounts for receiving assets). There's no mention of prerequisites, constraints, or typical use cases.

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

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