Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_genesis_hash

Retrieve the genesis hash for the Solana blockchain to validate network integrity or initialize connections. This tool provides the hash in a formatted string 'Genesis hash: {hash}', essential for blockchain interactions.

Instructions

Returns the genesis hash.

Returns: str: Genesis hash in the format "Genesis hash: {hash}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_genesis_hash' MCP tool. It is registered via the @mcp.tool() decorator and fetches the genesis hash from the Solana RPC client using AsyncClient, formatting the response as a string.
    @mcp.tool()
    async def get_genesis_hash() -> str:
        """Returns the genesis hash.
    
        Returns:
            str: Genesis hash in the format "Genesis hash: {hash}"
        """
        async with AsyncClient(rpc_url) as client:
            hash = await client.get_genesis_hash()
            return f"Genesis hash: {hash}"
  • src/server.py:141-141 (registration)
    The @mcp.tool() decorator registers the get_genesis_hash function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the return format ('Genesis hash: {hash}'), which adds some context, but lacks details on permissions, rate limits, or error handling. For a tool with zero annotation coverage, this is insufficient to fully inform the agent about its behavior.

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

Conciseness4/5

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

The description is concise and front-loaded, with the purpose stated clearly in the first sentence. The second sentence adds necessary return format details without redundancy. It could be slightly more structured by integrating the return format into the main sentence, but overall, it's efficient and wastes no words.

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 the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It explains what the tool does and the return format, but lacks usage guidelines and behavioral context like error handling. For a basic read operation, this is minimal viable but not fully comprehensive.

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, and schema description coverage is 100%, so no parameter information is needed. The description doesn't add any parameter details, which is appropriate here. A baseline of 4 is applied since there are no parameters to document, and the schema fully covers this aspect.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Returns the genesis hash.' It specifies the verb ('Returns') and resource ('genesis hash'), making it unambiguous. However, it doesn't explicitly differentiate from siblings like 'get_block' or 'get_latest_blockhash', which might also return hash-related data, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context, prerequisites, or compare it to sibling tools such as 'get_latest_blockhash' or 'get_block', leaving the agent to infer usage based on the name alone.

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