get_transaction_count
Retrieve the total number of transactions recorded on the Solana blockchain using this tool, providing essential ledger insights for monitoring blockchain activity.
Instructions
Returns the current Transaction count from the ledger.
Returns: str: Transaction count in the format "Transaction count: {count}"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:342-351 (handler)The handler function decorated with @mcp.tool(), which registers and implements the get_transaction_count tool. It connects to Solana RPC, fetches the transaction count, and returns a formatted string.@mcp.tool() async def get_transaction_count() -> str: """Returns the current Transaction count from the ledger. Returns: str: Transaction count in the format "Transaction count: {count}" """ async with AsyncClient(rpc_url) as client: count = await client.get_transaction_count() return f"Transaction count: {count}"
- src/server.py:342-342 (registration)The @mcp.tool() decorator registers the get_transaction_count function as an MCP tool.@mcp.tool()