zetrix_get_account_base
Retrieve basic account information from the Zetrix blockchain by providing an account address, returning essential details without assets or metadata.
Instructions
Get basic account information without assets and metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The Zetrix account address |
Implementation Reference
- src/zetrix-client.ts:338-357 (handler)Core handler implementation: Makes HTTP GET request to Zetrix API /getAccountBase endpoint to fetch basic account info (balance, nonce) without assets or metadata.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; } }
- src/index.ts:873-886 (handler)MCP server tool dispatch handler: Extracts address argument and calls ZetrixClient.getAccountBase, formats 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 tools array used by ListToolsRequestHandler. Includes name, description, and input schema.{ 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"], }, },
- src/zetrix-client.ts:83-89 (schema)TypeScript interface defining the structure of the account base response.export interface ZetrixAccountBase { address: string; balance: string; nonce: number; priv?: any; }