get_epoch_info
Retrieve detailed information about the current epoch on the Solana blockchain using this tool, enabling users to access essential data for blockchain analysis and decision-making.
Instructions
Returns information about the current epoch.
Returns: str: Epoch information in the format "Epoch info: {info}"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:117-127 (handler)The handler function that implements the 'get_epoch_info' tool logic. Decorated with @mcp.tool() which registers it in the MCP server. It queries the Solana RPC client for epoch info and formats the response.@mcp.tool() async def get_epoch_info() -> str: """Returns information about the current epoch. Returns: str: Epoch information in the format "Epoch info: {info}" """ async with AsyncClient(rpc_url) as client: info = await client.get_epoch_info() return f"Epoch info: {info}"
- src/server.py:117-117 (registration)The @mcp.tool() decorator registers the get_epoch_info function as a tool in the FastMCP server.@mcp.tool()