transaction_summary
Retrieve a transaction summary for a wallet on a blockchain network, showing earliest and latest transactions, total count, and optional gas usage statistics with currency conversion.
Instructions
Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency, withGas (include gas usage statistics). Returns summary of transaction activity for the specified wallet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | Yes | The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet'). | |
| walletAddress | Yes | The wallet address to get transaction summary for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically. | |
| quoteCurrency | No | Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency. | |
| withGas | No | Include gas usage statistics in the summary. Default is false. |
Implementation Reference
- src/services/TransactionService.ts:24-27 (registration)Main registration function that registers all transaction tools including transaction_summary on the MCP server.
export function addTransactionServiceTools( server: McpServer, goldRushClient: GoldRushClient ) { - Handler for the 'transaction_summary' tool. Accepts chainName, walletAddress, optional quoteCurrency and withGas. Calls GoldRushClient.TransactionService.getTransactionSummary() and returns stringified JSON result.
server.tool( "transaction_summary", "Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet.\n" + "Required: chainName (blockchain network), walletAddress (wallet address).\n" + "Optional: quoteCurrency, withGas (include gas usage statistics).\n" + "Returns summary of transaction activity for the specified wallet.", { chainName: z .enum(Object.values(ChainName) as [string, ...string[]]) .describe( "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')." ), walletAddress: z .string() .describe( "The wallet address to get transaction summary for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically." ), quoteCurrency: z .enum(Object.values(validQuoteValues) as [string, ...string[]]) .optional() .describe( "Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency." ), withGas: z .boolean() .optional() .describe( "Include gas usage statistics in the summary. Default is false." ), }, async (params) => { try { const response = await goldRushClient.TransactionService.getTransactionSummary( params.chainName as Chain, params.walletAddress, { quoteCurrency: params.quoteCurrency as Quote, withGas: params.withGas, } ); return { content: [ { type: "text", text: stringifyWithBigInt(response.data), }, ], }; } catch (err) { return { content: [{ type: "text", text: `Error: ${err}` }], isError: true, }; } } ); - Zod schema definitions for transaction_summary parameters: chainName (enum), walletAddress (string), quoteCurrency (optional enum), withGas (optional boolean).
{ chainName: z .enum(Object.values(ChainName) as [string, ...string[]]) .describe( "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')." ), walletAddress: z .string() .describe( "The wallet address to get transaction summary for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically." ), quoteCurrency: z .enum(Object.values(validQuoteValues) as [string, ...string[]]) .optional() .describe( "Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency." ), withGas: z .boolean() .optional() .describe( "Include gas usage statistics in the summary. Default is false." ), }, - src/server.ts:71-71 (registration)Call site where addTransactionServiceTools is invoked to register all transaction tools including transaction_summary.
addTransactionServiceTools(server, goldRushClient);