Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_account_assets

Retrieve asset holdings for a Zetrix blockchain account. Specify an address to view all assets, or add optional asset code and issuer parameters to filter results.

Instructions

Get asset holdings for an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address
codeNoAsset code (optional, must be used with issuer)
issuerNoAsset issuer address (optional, must be used with code)

Implementation Reference

  • Core handler function in ZetrixClient that executes the API call to retrieve account assets from the Zetrix node.
    async getAccountAssets(
      address: string,
      code?: string,
      issuer?: string
    ): Promise<ZetrixAccountAsset[]> {
      try {
        const params: any = { address };
        if (code && issuer) {
          params.code = code;
          params.issuer = issuer;
        }
    
        const response = await this.client.get("/getAccountAssets", { params });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        return response.data.result.assets || [];
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to get account assets: ${error.message}`);
        }
        throw error;
      }
    }
  • src/index.ts:155-176 (registration)
    Tool registration in the tools array, including name, description, and input schema.
    {
      name: "zetrix_get_account_assets",
      description: "Get asset holdings for an account",
      inputSchema: {
        type: "object",
        properties: {
          address: {
            type: "string",
            description: "The Zetrix account address",
          },
          code: {
            type: "string",
            description: "Asset code (optional, must be used with issuer)",
          },
          issuer: {
            type: "string",
            description: "Asset issuer address (optional, must be used with code)",
          },
        },
        required: ["address"],
      },
    },
  • MCP server request handler switch case that dispatches to ZetrixClient.getAccountAssets and formats the response.
    case "zetrix_get_account_assets": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.getAccountAssets(
        args.address as string,
        args.code as string | undefined,
        args.issuer as string | undefined
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the structure of account asset objects returned by the tool.
    export interface ZetrixAccountAsset {
      amount: string;
      key: {
        code: string;
        issuer: string;
      };
    }
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 of behavioral disclosure. It states 'Get asset holdings', implying a read-only operation, but does not specify details like whether it returns all assets or filtered ones, pagination, error handling, or authentication needs. This leaves significant gaps 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.

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It is front-loaded and directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured.

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 (3 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, usage context, and output format. With no output schema, it should ideally hint at return values, but it does not, leaving room for improvement.

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, documenting all parameters clearly. The description does not add any additional meaning beyond the schema, such as explaining the relationship between 'code' and 'issuer' or providing examples. Baseline score of 3 is appropriate as 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 verb 'Get' and the resource 'asset holdings for an account', making the purpose specific and understandable. However, it does not distinguish this tool from potential sibling tools like 'zetrix_get_balance' or 'zetrix_get_account', which might overlap in functionality, so it misses full differentiation.

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, such as 'zetrix_get_balance' or 'zetrix_get_account', which could also retrieve account-related data. There is no mention of prerequisites, exclusions, or specific contexts for usage.

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