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()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the return format ('Transaction count: {count}') which is helpful, but doesn't mention whether this is a read-only operation, if it requires authentication, potential rate limits, or what 'current' means in terms of data freshness. For a tool with zero annotation coverage, this leaves significant behavioral aspects undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each earn their place: the first states the core purpose, and the second clarifies the return format. There's zero wasted text, and the information is front-loaded with the most important detail first. The structure is logical and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a simple read operation with 0 parameters and no output schema, the description provides the essential purpose and return format. However, with no annotations and no output schema, it should ideally mention more about the behavioral context (like whether this is a safe read operation, data freshness, or any limitations). The description is adequate but has clear gaps in contextual information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to add parameter information, and it appropriately doesn't mention any parameters. This meets the baseline expectation for a zero-parameter tool, though it doesn't go beyond that baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Returns') and resource ('current Transaction count from the ledger'), distinguishing it from siblings like get_transaction (which retrieves details of a specific transaction) or get_balance (which returns account balances). It provides a precise verb+resource combination that leaves no ambiguity about the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the phrase 'current Transaction count from the ledger', suggesting this tool is for retrieving aggregate transaction metrics rather than individual transaction details. However, it doesn't explicitly state when to use this versus alternatives like get_transaction or get_blocks, nor does it mention any prerequisites or exclusions. The guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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