Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_leader_schedule

Retrieve the leader schedule for a specific epoch on the Solana blockchain, providing insights into validator rotations and block production timing.

Instructions

Returns the leader schedule for an epoch.

Args: epoch (Optional[int]): Epoch to get schedule for

Returns: str: Leader schedule information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epochNo

Implementation Reference

  • The handler function for the 'get_leader_schedule' tool. It fetches the leader schedule for a given epoch (or current) using the Solana AsyncClient and returns a formatted string with the schedule.
    @mcp.tool()
    async def get_leader_schedule(epoch: Optional[int] = None) -> str:
        """Returns the leader schedule for an epoch.
    
        Args:
            epoch (Optional[int]): Epoch to get schedule for
    
        Returns:
            str: Leader schedule information
        """
        async with AsyncClient(rpc_url) as client:
            schedule = await client.get_leader_schedule(epoch)
            return f"Leader schedule: {schedule}"
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. While it states the tool returns leader schedule information, it doesn't explain what format this information comes in, whether it's paginated, if there are rate limits, or any authentication requirements. 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 efficiently structured with clear sections for Args and Returns, making it easy to parse. It's appropriately sized for a single-parameter tool, though the 'Returns' section could be more informative about the format of the returned information.

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

Completeness2/5

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

Given that there are no annotations and no output schema, the description is insufficiently complete. It doesn't explain what leader schedule information looks like, how it's structured, or provide any examples. For a tool that presumably returns structured data about blockchain leadership, more context is needed for effective use.

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

Parameters3/5

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

The description includes an Args section that documents the single parameter 'epoch' as optional, which adds value beyond the input schema's 0% description coverage. However, it doesn't explain what an epoch is in this context, what values are valid, or what happens when the parameter is omitted (default behavior).

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 with a specific verb ('Returns') and resource ('leader schedule for an epoch'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_epoch_info' or 'get_epoch_schedule', which might be related but serve different functions.

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 sibling tools like 'get_epoch_info' and 'get_epoch_schedule' available, there's no indication of how this tool differs or when it's appropriate to use it over those options.

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