get_inflation_rate
Retrieve the current inflation rate for the Solana blockchain epoch with precision, aiding in economic analysis and decision-making.
Instructions
Returns the specific inflation values for the current epoch.
Returns: str: Inflation rate info in the format "Inflation rate: {rate}"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:177-186 (handler)The handler function for the 'get_inflation_rate' tool. It is registered via the @mcp.tool() decorator and implements the tool logic by querying the Solana RPC client for the current epoch's inflation rate and returning a formatted string.@mcp.tool() async def get_inflation_rate() -> str: """Returns the specific inflation values for the current epoch. Returns: str: Inflation rate info in the format "Inflation rate: {rate}" """ async with AsyncClient(rpc_url) as client: rate = await client.get_inflation_rate() return f"Inflation rate: {rate}"
- src/server.py:177-177 (registration)The @mcp.tool() decorator registers the get_inflation_rate function as an MCP tool.@mcp.tool()
- src/server.py:178-182 (schema)The function signature and docstring define the tool schema: no input parameters, returns a string with inflation rate information.async def get_inflation_rate() -> str: """Returns the specific inflation values for the current epoch. Returns: str: Inflation rate info in the format "Inflation rate: {rate}"