Skip to main content
Glama

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), }, ], }; }

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