Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_block_commitment

Retrieve commitment details for a specific block slot on the Solana blockchain using the Model Context Protocol Server, facilitating accurate block-level data access and verification.

Instructions

Fetch the commitment for particular block.

Args: slot (int): Block slot number to query

Returns: str: Block commitment information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYes

Implementation Reference

  • The handler function for the get_block_commitment tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function takes a slot number, queries the Solana RPC client for the block commitment, and returns it formatted as a string.
    @mcp.tool()
    async def get_block_commitment(slot: int) -> str:
        """Fetch the commitment for particular block.
    
        Args:
            slot (int): Block slot number to query
    
        Returns:
            str: Block commitment information
        """
        async with AsyncClient(rpc_url) as client:
            commitment = await client.get_block_commitment(slot)
            return f"Block commitment: {commitment}"
  • src/server.py:390-390 (registration)
    The @mcp.tool() decorator registers the get_block_commitment 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 'Fetch' which implies a read operation, but doesn't disclose behavioral traits like whether this requires authentication, rate limits, error conditions, or what format the commitment information takes. The description is minimal and lacks important operational context.

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 appropriately sized with clear sections (purpose, args, returns). The first sentence states the core purpose, followed by structured parameter and return documentation. There's no wasted text, though it could be slightly more front-loaded with the most critical information.

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?

For a single-parameter read operation with no output schema, the description is minimally adequate. It covers the basic purpose and parameter meaning, but lacks important context about what 'commitment information' actually contains, error handling, or performance characteristics. Without annotations, it should provide more operational guidance.

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?

With only 1 parameter and 0% schema description coverage, the description compensates well by explaining that 'slot' is a 'Block slot number to query'. This adds meaningful semantic context beyond what the bare schema provides. The description effectively clarifies the parameter's purpose and usage.

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 verb ('Fetch') and resource ('commitment for particular block'), making the purpose evident. It distinguishes itself from siblings like 'get_block' or 'get_block_time' by focusing specifically on commitment information. However, it doesn't explicitly differentiate from all possible siblings in the list, keeping it at 4 rather than 5.

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. With siblings like 'get_block', 'get_blocks', and 'get_block_time', there's no indication of when commitment information is needed versus other block data. The description lacks any context about use cases or prerequisites.

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