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}"

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