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 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 handler function that executes the tool logic by making an HTTP GET request to the Zetrix RPC endpoint '/getTransactionCache' with optional hash and limit parameters, handling errors and returning the result.
    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; } }
  • Tool schema definition including input schema for hash and limit parameters.
    { 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)", }, }, }, },
  • src/index.ts:940-953 (registration)
    MCP tool dispatch/registration in the CallToolRequestSchema handler switch statement, invoking the ZetrixClient method.
    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), }, ], }; }
  • src/index.ts:768-770 (registration)
    General registration of all tools via ListToolsRequestSchema handler, which returns the tools array containing this tool.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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