Skip to main content
Glama

zetrix_get_account

Retrieve Zetrix account details such as balance and metadata by providing the blockchain address.

Instructions

Get Zetrix account information including balance and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address

Implementation Reference

  • Core handler implementation in ZetrixClient: Makes HTTP GET request to Zetrix RPC /getAccount endpoint with address parameter, processes response into ZetrixAccount object including balance, nonce, metadata.
    async getAccount(address: string): Promise<ZetrixAccount> { try { const response = await this.client.get("/getAccount", { params: { address }, }); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } const account = response.data.result; return { address: account.address || address, balance: account.balance || "0", nonce: account.nonce || 0, metadata: account.metadatas, }; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to get account: ${error.message}`); } throw error; } }
  • MCP server dispatch handler: Extracts address from tool arguments, calls zetrixClient.getAccount(), formats result as MCP response.
    case "zetrix_get_account": { if (!args) { throw new Error("Missing arguments"); } const result = await zetrixClient.getAccount(args.address as string); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool schema definition: Specifies input as object with required 'address' string field.
    name: "zetrix_get_account", description: "Get Zetrix account information including balance and metadata", inputSchema: { type: "object", properties: { address: { type: "string", description: "The Zetrix account address", }, }, required: ["address"], }, },
  • src/index.ts:768-770 (registration)
    Registers all tools including zetrix_get_account by returning the tools array in ListTools response.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Output type definition for account data returned by getAccount.
    export interface ZetrixAccount { address: string; balance: string; nonce: number; metadata?: any; }

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/Zetrix-Chain/zetrix-mcp-server'

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