Skip to main content
Glama

helius_get_inflation_reward

Retrieve inflation rewards for specified addresses on the Solana blockchain by providing address lists, epoch, and commitment level using MCP Helius server.

Instructions

Get inflation rewards for a list of addresses

Input Schema

NameRequiredDescriptionDefault
addressesYes
commitmentNo
epochNo

Input Schema (JSON Schema)

{ "properties": { "addresses": { "items": { "type": "string" }, "type": "array" }, "commitment": { "enum": [ "confirmed", "finalized", "processed" ], "type": "string" }, "epoch": { "type": "number" } }, "required": [ "addresses" ], "type": "object" }

Implementation Reference

  • The handler function that validates input addresses, calls Helius connection.getInflationReward, and returns the result or error.
    export const getInflationRewardHandler = async (input: GetInflationRewardInput): Promise<ToolResultSchema> => { try { const addresses = []; for (const addr of input.addresses) { const result = validatePublicKey(addr); if (!(result instanceof PublicKey)) { return result; // Return the error response if any address is invalid } addresses.push(result); } const rewards = await (helius as any as Helius).connection.getInflationReward(addresses, input.epoch, input.commitment); return createSuccessResponse(`Inflation rewards: ${JSON.stringify(rewards, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting inflation rewards: ${error instanceof Error ? error.message : String(error)}`); } }
  • The input schema definition for the helius_get_inflation_reward tool, defining parameters like addresses (required array of strings), epoch, and commitment.
    { name: "helius_get_inflation_reward", description: "Get inflation rewards for a list of addresses", inputSchema: { type: "object", properties: { addresses: { type: "array", items: { type: "string" } }, epoch: { type: "number" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["addresses"] } },
  • src/tools.ts:565-565 (registration)
    Registration of the tool name to its handler function in the handlers dictionary.
    "helius_get_inflation_reward": getInflationRewardHandler,

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/dcSpark/mcp-server-helius'

If you have feedback or need assistance with the MCP directory API, please join our Discord server