Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_account_metadata

Retrieve metadata associated with a Zetrix blockchain account, optionally filtering by specific key to access account information and attributes.

Instructions

Get metadata associated with an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address
keyNoSpecific metadata key (optional)

Implementation Reference

  • Core handler function that fetches account metadata from Zetrix API endpoint /getAccountMetaData, supports optional specific key, processes and normalizes the response into ZetrixAccountMetadata[] format.
    async getAccountMetadata(
      address: string,
      key?: string
    ): Promise<ZetrixAccountMetadata[]> {
      try {
        const params: any = { address };
        if (key) {
          params.key = key;
        }
    
        const response = await this.client.get("/getAccountMetaData", { params });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        // If a specific key is requested, the result is keyed by that key name
        // Otherwise it returns metadatas array
        const result = response.data.result;
        if (key && result[key]) {
          return [result[key]];
        }
        return result.metadatas || [];
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to get account metadata: ${error.message}`);
        }
        throw error;
      }
    }
  • src/index.ts:177-194 (registration)
    Tool registration in the tools list, including name and input schema definition.
    {
      name: "zetrix_get_account_metadata",
      description: "Get metadata associated with an account",
      inputSchema: {
        type: "object",
        properties: {
          address: {
            type: "string",
            description: "The Zetrix account address",
          },
          key: {
            type: "string",
            description: "Specific metadata key (optional)",
          },
        },
        required: ["address"],
      },
    },
  • MCP server dispatch handler case that extracts arguments and delegates to ZetrixClient.getAccountMetadata, formats response as MCP content.
    case "zetrix_get_account_metadata": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.getAccountMetadata(
        args.address as string,
        args.key as string | undefined
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the structure of account metadata entries returned by the handler.
    export interface ZetrixAccountMetadata {
      key: string;
      value: string;
      version: number;
    }
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 a read operation ('Get'), implying it's non-destructive, but lacks details on permissions, rate limits, error conditions, or return format. For a tool with no annotation coverage, this is a significant gap in transparency.

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 zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that likely returns structured metadata. It doesn't explain what 'metadata' entails (e.g., types of data, format) or behavioral aspects like error handling. For a read operation in a complex sibling environment, more context is needed.

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?

Schema description coverage is 100%, with clear descriptions for both parameters ('address' and 'key'). The description adds no additional meaning beyond the schema, such as format examples or usage context for the optional 'key'. Baseline 3 is appropriate when 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 resource ('metadata associated with an account'), making the purpose evident. However, it doesn't differentiate from sibling tools like 'zetrix_get_account' or 'zetrix_get_account_base', which might also retrieve account information, leaving some ambiguity about what specifically distinguishes this metadata retrieval.

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. With many sibling tools related to accounts (e.g., 'zetrix_get_account', 'zetrix_get_account_assets'), there's no indication of context, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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