Skip to main content
Glama

helius_get_inflation_reward

Retrieve inflation rewards for Solana addresses by specifying addresses, epoch, and commitment level to analyze staking returns.

Instructions

Get inflation rewards for a list of addresses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressesYes
epochNo
commitmentNo

Implementation Reference

  • Main handler function implementing the tool logic: validates addresses, calls Helius RPC getInflationReward, and formats response.
    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)}`);
      }
    }
  • MCP tool schema definition including input validation schema for the tool.
    {
      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)
    Tool registration mapping the name to its handler function in the handlers dictionary.
    "helius_get_inflation_reward": getInflationRewardHandler,
  • TypeScript interface defining the input shape for the handler, used for type safety.
    export type GetInflationRewardInput = {
      addresses: string[];
      epoch?: number;
      commitment?: "confirmed" | "finalized" | "processed";
    }
  • src/tools.ts:18-18 (registration)
    Import of the handler function from handlers/helius.ts.
    getInflationRewardHandler,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but doesn't describe what 'inflation rewards' entail (e.g., staking rewards, distribution format), potential rate limits, authentication needs, or error conditions. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Get inflation rewards for a list of addresses') contributes directly to understanding the tool's function, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, 0% schema coverage, no annotations, no output schema), the description is incomplete. It doesn't explain what inflation rewards are, how results are returned, or the roles of optional parameters like 'epoch' and 'commitment'. For a tool that likely returns financial data, more context is needed to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'addresses' but doesn't explain the format (e.g., Solana public keys) or constraints. It omits 'epoch' and 'commitment' entirely, leaving their purposes unclear. The description adds minimal value beyond the schema, failing to address the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('inflation rewards') with scope ('for a list of addresses'), making the purpose immediately understandable. It distinguishes from siblings like 'helius_get_balance' or 'helius_get_epoch_info' by specifying inflation rewards rather than general account data. However, it doesn't explicitly differentiate from all possible siblings, keeping it at a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing valid Solana addresses), exclusions, or comparisons to siblings like 'helius_get_epoch_info' for epoch-related data. Without any usage context, the agent must infer when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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