Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_account

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

Instructions

Get Zetrix account information including balance and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address

Implementation Reference

  • Core handler function that executes the tool logic: makes HTTP GET request to Zetrix RPC /getAccount endpoint, handles errors, and returns formatted account data (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: validates input arguments and calls the core getAccount implementation, formats response as MCP content.
    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),
          },
        ],
      };
    }
  • src/index.ts:69-82 (registration)
    Tool registration in the tools list used by MCP ListTools handler, includes name, description, and input schema.
    {
      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"],
      },
    },
  • TypeScript interface defining the output structure of the account data returned by the handler.
    export interface ZetrixAccount {
      address: string;
      balance: string;
      nonce: number;
      metadata?: any;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions retrieving 'account information including balance and metadata', which implies a read-only operation, but does not disclose behavioral traits such as permissions required, rate limits, error handling, or what specific metadata is returned. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Get Zetrix account information') and includes key details ('including balance and metadata'). There is no wasted text, though it could be slightly more structured for clarity.

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 (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage guidelines, and output format, which are needed for full contextual understanding.

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, with the single parameter 'address' documented as 'The Zetrix account address'. The description does not add any meaning beyond this, such as format examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

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 tool's purpose with a specific verb ('Get') and resource ('Zetrix account information'), including what information is retrieved ('balance and metadata'). It distinguishes from some siblings like 'zetrix_get_balance' (which only gets balance) but not from 'zetrix_get_account_base' or 'zetrix_get_account_metadata' (which might overlap).

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?

The description provides no guidance on when to use this tool versus alternatives like 'zetrix_get_balance', 'zetrix_get_account_base', or 'zetrix_get_account_metadata'. It lacks explicit when/when-not instructions or named alternatives, leaving usage context unclear.

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

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