Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_block

Retrieve identity and transaction details for a confirmed block on the Solana blockchain using a specified slot number.

Instructions

Returns identity and transaction information about a confirmed block in the ledger.

Args: slot (int): Slot number as u64 integer

Returns: str: Block information in the format "Block: {block}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYes

Implementation Reference

  • The main handler function for the 'get_block' MCP tool. It is decorated with @mcp.tool() which registers it automatically. The function takes a slot integer, fetches the block data from the Solana RPC client, and returns a formatted string representation. The docstring provides the input/output schema description used by MCP.
    @mcp.tool()
    async def get_block(slot: int) -> str:
        """Returns identity and transaction information about a confirmed block in the ledger.
    
        Args:
            slot (int): Slot number as u64 integer
    
        Returns:
            str: Block information in the format "Block: {block}"
        """
        async with AsyncClient(rpc_url) as client:
            block = await client.get_block(slot)
            return f"Block: {block}"
  • src/server.py:47-47 (registration)
    The @mcp.tool() decorator registers the get_block 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 full burden. It states the tool returns information about a 'confirmed block', which hints at read-only behavior, but does not disclose other traits like error handling, rate limits, or whether it requires specific permissions. The description adds minimal behavioral context beyond the basic operation.

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 appropriately sized and front-loaded, starting with the core purpose. The Args and Returns sections are structured clearly without unnecessary details, making it efficient and easy to parse.

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 moderate complexity (retrieving block data), no annotations, no output schema, and 0% schema coverage, the description is somewhat complete but lacks details on output format beyond a string example, error cases, or behavioral constraints. It meets minimum viability but has clear gaps for full agent understanding.

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 description adds meaning beyond the input schema by explaining that 'slot' is a 'Slot number as u64 integer', clarifying the data type and format. With 0% schema description coverage and only 1 parameter, this compensates well, though it could provide more context on valid slot ranges or examples.

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 verb ('Returns') and resource ('identity and transaction information about a confirmed block in the ledger'), making the purpose specific. It distinguishes from siblings like 'get_blocks' (plural) and 'get_block_time' by specifying it returns block information rather than multiple blocks or timing data.

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 for retrieving block details by slot number, but does not explicitly state when to use this tool versus alternatives like 'get_blocks' or 'get_block_commitment'. No exclusions or prerequisites are mentioned, leaving usage context partially inferred.

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