Skip to main content
Glama

get_account_info

Retrieve account details, including balance and assets, from the Algorand blockchain network by providing an Algorand account address.

Instructions

Get account information including balance and assets

Input Schema

NameRequiredDescriptionDefault
addressYesAlgorand account address

Input Schema (JSON Schema)

{ "properties": { "address": { "description": "Algorand account address", "type": "string" } }, "required": [ "address" ], "type": "object" }

Implementation Reference

  • MCP tool handler for 'get_account_info': parses arguments using Zod schema, fetches account info via algorandService, formats and returns text response or error.
    case 'get_account_info': { const parsed = GetAccountInfoArgsSchema.parse(args); try { const accountInfo = await algorandService.getAccountInfo(parsed.address); return { content: [ { type: 'text', text: `Account Information for ${parsed.address}:\n` + `Balance: ${Number(accountInfo.balance) / 1000000} ALGO\n` + `Minimum Balance: ${Number(accountInfo.minBalance) / 1000000} ALGO\n` + `Status: ${accountInfo.status}\n` + `Assets: ${accountInfo.assets.length}\n` + `Created Apps: ${accountInfo.createdApps.length}\n` + `Created Assets: ${accountInfo.createdAssets.length}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting account info: ${error}`, }, ], isError: true, }; } }
  • Zod schema for validating input arguments (address: string) used in the get_account_info handler.
    const GetAccountInfoArgsSchema = z.object({ address: z.string(), });
  • src/index.ts:165-178 (registration)
    Tool registration in TOOLS array with name, description, and JSON inputSchema matching the Zod schema.
    { name: 'get_account_info', description: 'Get account information including balance and assets', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Algorand account address', }, }, required: ['address'], }, },
  • Core helper function in AlgorandService that queries the Algorand node for account information and returns formatted account details.
    async getAccountInfo(address: string) { try { const accountInfo = await this.algodClient.accountInformation(address).do(); return { address: accountInfo.address, balance: accountInfo.amount, minBalance: accountInfo.minBalance, status: accountInfo.status, assets: accountInfo.assets || [], appsLocalState: accountInfo.appsLocalState || [], createdApps: accountInfo.createdApps || [], createdAssets: accountInfo.createdAssets || [] }; } catch (error) { throw new Error(`Failed to get account info: ${error}`); } }

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