Skip to main content
Glama

zetrix_get_account_base

Retrieve basic account information for a Zetrix blockchain address, providing essential details without assets or metadata.

Instructions

Get basic account information without assets and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address

Implementation Reference

  • Core handler function that executes the tool logic by querying the Zetrix RPC endpoint /getAccountBase for basic account details (address, balance, nonce). Handles API errors and response parsing.
    async getAccountBase(address: string): Promise<ZetrixAccountBase> { try { const response = await this.client.get("/getAccountBase", { params: { address }, }); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } return response.data.result; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to get account base: ${error.message}`); } throw error; } }
  • MCP server handler (switch case) that receives tool calls, extracts the address argument, invokes ZetrixClient.getAccountBase(), and formats the response as MCP content.
    case "zetrix_get_account_base": { if (!args) { throw new Error("Missing arguments"); } const result = await zetrixClient.getAccountBase(args.address as string); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:141-154 (registration)
    Tool registration in the MCP tools array, including name, description, and input schema requiring an 'address' string.
    { name: "zetrix_get_account_base", description: "Get basic account information without assets and metadata", inputSchema: { type: "object", properties: { address: { type: "string", description: "The Zetrix account address", }, }, required: ["address"], }, },
  • TypeScript interface defining the structure of the account base response (address, balance, nonce, optional priv).
    export interface ZetrixAccountBase { address: string; balance: string; nonce: number; priv?: 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