Skip to main content
Glama

getTransactionCount

Retrieve the total number of transactions sent from a specific Ethereum address using this tool. Ideal for analyzing wallet activity and transaction history on the Ethereum blockchain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes

Implementation Reference

  • Handler function that fetches the transaction count (nonce) for the given Ethereum address using web3.eth.getTransactionCount and returns it in the MCP response format.
    async ({ address }) => { try { const transactionCount = await web3.eth.getTransactionCount(address); return { content: [{ type: "text", text: `Transaction count (nonce) for ${address}: ${transactionCount}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error fetching transaction count: ${error.message}` }] }; } } );
  • Input schema using Zod to validate the Ethereum address parameter.
    { address: z.string().regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address") },
  • tools/balance.js:29-29 (registration)
    Registration of the getTransactionCount tool on the MCP server.
    server.tool("getTransactionCount",

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/0xGval/evm-mcp-tools'

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