Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_inflation_reward

Calculate inflation or staking rewards for specific Solana addresses by providing account details and an optional epoch. Retrieve precise reward information for blockchain transactions.

Instructions

Returns the inflation/staking reward for a list of addresses for an epoch.

Args: pubkeys (list[str]): List of account addresses epoch (Optional[int]): Epoch for which to calculate rewards

Returns: str: Inflation reward information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epochNo
pubkeysYes

Implementation Reference

  • Handler function for the 'get_inflation_reward' tool. It takes a list of public keys and an optional epoch, queries the Solana RPC client for inflation rewards, and returns a formatted string with the results.
    @mcp.tool()
    async def get_inflation_reward(pubkeys: list[str], epoch: Optional[int] = None) -> str:
        """Returns the inflation/staking reward for a list of addresses for an epoch.
    
        Args:
            pubkeys (list[str]): List of account addresses
            epoch (Optional[int]): Epoch for which to calculate rewards
    
        Returns:
            str: Inflation reward information
        """
        async with AsyncClient(rpc_url) as client:
            pks = [Pubkey.from_string(pk) for pk in pubkeys]
            rewards = await client.get_inflation_reward(pks, epoch)
            return f"Inflation rewards: {rewards}"
  • src/server.py:482-482 (registration)
    The @mcp.tool() decorator registers the get_inflation_reward function as an MCP tool.
    @mcp.tool()
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 tool returns reward information but doesn't describe the format, whether it's read-only, if it has rate limits, or any side effects. For a tool with no annotation coverage, this is inadequate, as it leaves key behavioral traits unspecified.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with the purpose stated first, followed by structured Arg and Return sections. Every sentence adds value, and there's no wasted text. However, the structure could be slightly improved by integrating usage context into the flow.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is partially complete. It covers the purpose and parameters well but lacks behavioral details, usage guidelines, and output format explanation. Without annotations or output schema, it should do more to compensate, making it adequate but with clear gaps.

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

Parameters4/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. It adds meaningful semantics: 'pubkeys (list[str]): List of account addresses' and 'epoch (Optional[int]): Epoch for which to calculate rewards,' clarifying what each parameter represents beyond the schema's basic types. This covers both parameters effectively, though it could provide more detail on epoch defaults or pubkey formats.

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 tool's purpose: 'Returns the inflation/staking reward for a list of addresses for an epoch.' It specifies the verb ('returns'), resource ('inflation/staking reward'), and scope ('list of addresses for an epoch'), distinguishing it from siblings like get_inflation_rate or get_inflation_governor. However, it doesn't explicitly differentiate from all siblings, such as get_balance or get_account_info, which might also provide reward-related data.

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, context, or exclusions, such as whether it's for historical or current data, or how it differs from similar tools like get_inflation_rate. With many sibling tools available, this lack of usage context is a significant gap.

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

Related 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/tywenk/mcp-sol'

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