Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_slot_leader

Retrieve the current slot leader on the Solana blockchain using the Model Context Protocol Server. This tool provides the slot leader’s ID in a structured format for real-time blockchain interaction.

Instructions

Returns the current slot leader.

Returns: str: Slot leader in the format "Slot leader: {leader}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function decorated with @mcp.tool(), which implements the get_slot_leader tool by querying the Solana RPC client for the current slot leader and returning a formatted string response.
    @mcp.tool()
    async def get_slot_leader() -> str:
        """Returns the current slot leader.
    
        Returns:
            str: Slot leader in the format "Slot leader: {leader}"
        """
        async with AsyncClient(rpc_url) as client:
            leader = await client.get_slot_leader()
            return f"Slot leader: {leader}"
  • src/server.py:286-286 (registration)
    The @mcp.tool() decorator registers the get_slot_leader 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 ('str: Slot leader in the format "Slot leader: {leader}"'), which adds some context beyond the basic purpose. However, it lacks details on critical behaviors like whether this is a read-only operation, potential rate limits, authentication needs, or error conditions, leaving significant gaps for a tool with no annotation support.

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 highly concise and well-structured. It uses two sentences: the first states the purpose, and the second specifies the return format. Every sentence adds value without redundancy, making it front-loaded and efficient for quick understanding by an AI agent.

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 clear gaps. It covers the purpose and return format, which is sufficient for basic use. However, without annotations or output schema, it lacks details on behavioral traits like safety or error handling, making it minimally viable but not fully comprehensive for operational context.

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 documentation is needed. The description doesn't add parameter information, which is appropriate here. A baseline score of 4 is applied as it meets the requirement for zero-parameter tools by not introducing unnecessary details.

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 current slot leader.' It specifies the verb ('returns') and resource ('current slot leader'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_leader_schedule' or 'get_slot', which provide related but distinct information about leadership or slot data.

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 exclusions, such as when to prefer 'get_leader_schedule' for broader leadership data or 'get_slot' for slot numbers. This lack of usage instructions leaves the agent to infer appropriate scenarios from the tool 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