Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_block

Retrieve detailed information about a specific Zetrix blockchain block by providing its height or number to access transaction data and network state.

Instructions

Get information about a specific block by height

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockNumberYesThe block height/number to query

Implementation Reference

  • Tool schema definition including name, description, and input schema requiring blockNumber.
    {
      name: "zetrix_get_block",
      description: "Get information about a specific block by height",
      inputSchema: {
        type: "object",
        properties: {
          blockNumber: {
            type: "number",
            description: "The block height/number to query",
          },
        },
        required: ["blockNumber"],
      },
    },
  • src/index.ts:804-817 (registration)
    Tool registration in the MCP server switch statement, dispatching to zetrixClient.getBlock().
    case "zetrix_get_block": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.getBlock(args.blockNumber as number);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core handler logic in ZetrixClient.getBlock(): Calls Zetrix API /getLedger with seq parameter, processes response, maps to ZetrixBlock interface, handles errors.
    async getBlock(blockNumber: number): Promise<ZetrixBlock> {
      try {
        const response = await this.client.get("/getLedger", {
          params: { seq: blockNumber },
        });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        const block = response.data.result.header;
        return {
          blockNumber: block.seq || blockNumber,
          closeTime: block.close_time || 0,
          hash: block.hash || "",
          prevHash: block.previous_hash || "",
          txCount: block.tx_count || 0,
          transactions: response.data.result.transactions,
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to get block: ${error.message}`);
        }
        throw error;
      }
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states it 'gets information' without detailing behavioral traits like read-only nature, potential errors, rate limits, or response format. It misses critical context for safe and effective use, such as whether it's a query or mutation.

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, clear sentence with no wasted words, efficiently conveying the core purpose. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 complex block data. It fails to explain what information is retrieved, error conditions, or behavioral aspects, leaving significant gaps for an AI agent to understand the tool fully.

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%, so the input schema fully documents the 'blockNumber' parameter. The description adds no additional meaning beyond implying the parameter is for querying by height, aligning with the baseline score when schema handles parameter documentation.

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 action ('Get information') and resource ('about a specific block by height'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'zetrix_get_latest_block' or specify what type of information is returned, keeping it from a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives such as 'zetrix_get_latest_block' for the latest block or 'zetrix_get_ledger' for broader data. The description lacks context about prerequisites or exclusions, offering minimal usage direction.

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