Skip to main content
Glama

Etherscan MCP

transactionsTools.ts1.32 kB
import { FastMCP } from "fastmcp"; import { z } from "zod"; import { apiCall } from "./utils.js"; export function registerTransactionsTools(server: FastMCP) { // Check Contract Execution Status server.addTool({ name: "transaction__getstatus", description: "Returns the status code of a contract execution.", parameters: z.object({ txhash: z.string().describe("the `string` representing the transaction hash to check the execution status"), chainid: z.string().optional().default("1").describe("The chain id, default is 1") }), execute: async (params) => { const fullParams = { ...params, module: "transaction", action: "getstatus" }; return await apiCall(fullParams); } }); // Check Transaction Receipt Status server.addTool({ name: "transaction__gettxreceiptstatus", description: "Returns the status code of a transaction execution.", parameters: z.object({ txhash: z.string().describe("the `string` representing the transaction hash to check the execution status"), chainid: z.string().optional().default("1").describe("The chain id, default is 1") }), execute: async (params) => { const fullParams = { ...params, module: "transaction", action: "gettxreceiptstatus" }; return await apiCall(fullParams); } }); }

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/xiaok/etherscan-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server