get_slot
Retrieve the current slot being processed by a Solana node using the Model Context Protocol Server. Use this tool to monitor blockchain progress and synchronize data efficiently.
Instructions
Returns the current slot the node is processing.
Returns: str: Current slot in the format "Current slot: {slot}"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:274-283 (handler)The main handler function for the 'get_slot' MCP tool. It is registered via the @mcp.tool() decorator and implements the tool logic by querying the Solana RPC client for the current slot and returning a formatted string response.@mcp.tool() async def get_slot() -> str: """Returns the current slot the node is processing. Returns: str: Current slot in the format "Current slot: {slot}" """ async with AsyncClient(rpc_url) as client: slot = await client.get_slot() return f"Current slot: {slot}"