Skip to main content
Glama

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; }

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