Skip to main content
Glama
Jake-loranger

Algorand MCP Server

load_wallet

Access a stored Algorand wallet by providing its name and password to retrieve the associated blockchain address for transactions.

Instructions

Load a stored wallet and return the address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWallet name/identifier
passwordYesPassword to decrypt the mnemonic

Implementation Reference

  • Main handler for the 'load_wallet' tool. Parses arguments, retrieves the stored wallet from in-memory storage, decrypts the mnemonic using AlgorandService, and returns the wallet address and decrypted mnemonic.
    case 'load_wallet': {
        const parsed = LoadWalletArgsSchema.parse(args);
        try {
            const wallet = walletStorage.get(parsed.name);
            if (!wallet) {
                throw new Error(`Wallet "${parsed.name}" not found`);
            }
    
            // Decrypt mnemonic
            const mnemonic = algorandService.decryptMnemonic(
                wallet.encryptedMnemonic,
                wallet.iv,
                parsed.password
            );
    
            return {
                content: [
                    {
                        type: 'text',
                        text: `Wallet "${parsed.name}" loaded successfully!\nAddress: ${wallet.address}\nMnemonic: ${mnemonic}\n\n⚠️ Keep this mnemonic secure and private.`,
                    },
                ],
            };
        } catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error loading wallet: ${error}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Zod schema defining the input parameters for the load_wallet tool: wallet name and password.
    const LoadWalletArgsSchema = z.object({
        name: z.string(),
        password: z.string(),
    });
  • src/index.ts:345-362 (registration)
    Registration of the 'load_wallet' tool in the TOOLS array, including name, description, and input schema definition.
    {
        name: 'load_wallet',
        description: 'Load a stored wallet and return the address',
        inputSchema: {
            type: 'object',
            properties: {
                name: {
                    type: 'string',
                    description: 'Wallet name/identifier',
                },
                password: {
                    type: 'string',
                    description: 'Password to decrypt the mnemonic',
                },
            },
            required: ['name', 'password'],
        },
    },
  • Helper method in AlgorandService used by the load_wallet handler to decrypt the stored mnemonic phrase using AES-256-GCM.
    /**
     * Decrypt a mnemonic phrase
     */
    decryptMnemonic(encryptedData: string, iv: string, password: string): string {
        const key = crypto.scryptSync(password, 'salt', 32);
        const [encrypted, authTag] = encryptedData.split(':');
    
        if (!encrypted || !authTag) {
            throw new Error('Invalid encrypted data format');
        }
    
        const decipher = crypto.createDecipheriv('aes-256-gcm', key, Buffer.from(iv, 'hex'));
        decipher.setAuthTag(Buffer.from(authTag, 'hex'));
    
        let decrypted = decipher.update(encrypted, 'hex', 'utf8');
        decrypted += decipher.final('utf8');
    
        return decrypted;
    }
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 decryption ('Password to decrypt the mnemonic' is in the schema, not the description) and returning an address, but lacks details on permissions, error handling, or side effects. It doesn't specify if this tool authenticates the user, what happens on failure, or if it modifies any state.

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 a single, efficient sentence that directly states the tool's purpose and outcome. It is front-loaded with no unnecessary words, making it easy to understand quickly without any wasted space.

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 moderate complexity (involving decryption and address retrieval), no annotations, and no output schema, the description is minimally adequate. It covers the basic action but lacks details on return values, error cases, or behavioral nuances. It meets the minimum viable standard but has clear gaps in completeness for secure wallet operations.

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, providing clear details for both parameters ('name' and 'password'). The description adds no additional parameter semantics beyond what the schema already states, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.

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 ('Load') and resource ('a stored wallet') with the outcome ('return the address'). It distinguishes from siblings like 'store_wallet' (which creates) and 'generate_algorand_account' (which creates new). However, it doesn't explicitly differentiate from 'get_account_info' which might retrieve similar information, leaving some ambiguity.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this should be used instead of 'get_account_info' for accessing wallet addresses or if it's specifically for loading encrypted wallets. The description implies usage but offers no explicit context or exclusions.

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