Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_transaction_cache

Retrieve pending blockchain transactions that have not yet been executed, allowing users to monitor unconfirmed activity and track transaction status on the Zetrix network.

Instructions

Get pending transactions not yet executed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashNoTransaction hash (optional)
limitNoNumber of pending transactions to return (optional)

Implementation Reference

  • Core implementation of the tool: Makes HTTP GET request to Zetrix API /getTransactionCache endpoint with optional hash and limit params, validates response, handles errors, and returns pending transaction cache data.
    async getTransactionCache(hash?: string, limit?: number): Promise<any> {
      try {
        const params: any = {};
        if (hash) params.hash = hash;
        if (limit) params.limit = limit;
    
        const response = await this.client.get("/getTransactionCache", { params });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        return response.data.result;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to get transaction cache: ${error.message}`);
        }
        throw error;
      }
    }
  • src/index.ts:212-228 (registration)
    Tool registration in the MCP tools list, including name, description, and input schema definition.
    {
      name: "zetrix_get_transaction_cache",
      description: "Get pending transactions not yet executed",
      inputSchema: {
        type: "object",
        properties: {
          hash: {
            type: "string",
            description: "Transaction hash (optional)",
          },
          limit: {
            type: "number",
            description: "Number of pending transactions to return (optional)",
          },
        },
      },
    },
  • MCP server request handler case that receives tool call arguments, invokes ZetrixClient.getTransactionCache, formats response as MCP content, and returns it.
    case "zetrix_get_transaction_cache": {
      const result = await zetrixClient.getTransactionCache(
        args?.hash as string | undefined,
        args?.limit as number | undefined
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
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 the tool retrieves pending transactions, implying a read-only operation, but doesn't cover critical aspects like rate limits, authentication needs, error handling, or what 'not yet executed' entails (e.g., timeouts, cancellation). This leaves significant gaps for an AI agent.

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, front-loading the core purpose. It's appropriately sized for a simple tool, making it easy for an AI agent to parse quickly without unnecessary details.

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. It doesn't explain what the tool returns (e.g., a list of transactions, their statuses, or metadata), leaving the AI agent uncertain about the response format. For a tool with two parameters and no structured output, more context is needed to be fully helpful.

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, clearly documenting both parameters as optional. The description adds no additional meaning beyond the schema, such as default values for 'limit' or how 'hash' filters results. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('pending transactions not yet executed'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'zetrix_get_transaction' or 'zetrix_get_transaction_history', which likely retrieve different types of transaction data, so it doesn't reach the highest 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. With sibling tools like 'zetrix_get_transaction' and 'zetrix_get_transaction_history', the description lacks context on whether this is for real-time monitoring, debugging, or other specific scenarios, offering no explicit or implied usage instructions.

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