Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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()

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/tywenk/mcp-sol'

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