Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_minimum_balance_for_rent_exemption

Calculate the minimum balance needed for Solana accounts to be rent-exempt, based on specified data size, ensuring efficient blockchain interactions.

Instructions

Returns minimum balance required to make account rent exempt.

Args: size (int): Account data length

Returns: str: Minimum balance in the format "Minimum balance for rent exemption: {balance}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes

Implementation Reference

  • The handler function decorated with @mcp.tool() registers and implements the tool. It creates an AsyncClient to the Solana RPC, calls get_minimum_balance_for_rent_exemption with the provided size, and formats the result as a string.
    @mcp.tool()
    async def get_minimum_balance_for_rent_exemption(size: int) -> str:
        """Returns minimum balance required to make account rent exempt.
    
        Args:
            size (int): Account data length
    
        Returns:
            str: Minimum balance in the format "Minimum balance for rent exemption: {balance}"
        """
        async with AsyncClient(rpc_url) as client:
            balance = await client.get_minimum_balance_for_rent_exemption(size)
            return f"Minimum balance for rent exemption: {balance}"
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. It states the tool returns a string in a specific format, which is useful, but does not disclose behavioral traits like whether this is a read-only operation, if it has rate limits, or what happens with invalid inputs. The description adds minimal context beyond the basic return format, leaving significant gaps in transparency.

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 main purpose stated first, followed by structured sections for Args and Returns. Each sentence earns its place by providing essential information, though the return format could be more succinctly integrated. There is minimal waste, but slight room for improvement in 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 low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the purpose, parameter semantics, and return format, but lacks usage guidelines and behavioral transparency. For a simple query tool, this is acceptable but has clear gaps, especially in guiding the agent on when and how to use it effectively.

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 meaning by explaining that 'size' represents 'Account data length', which clarifies the parameter's purpose beyond the schema's title 'Size'. However, it does not provide details on units, constraints, or examples, leaving some ambiguity. With one parameter and partial semantic enhancement, this scores above baseline.

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 minimum balance required to make account rent exempt.' It specifies the verb ('returns'), resource ('minimum balance'), and context ('rent exempt'), but does not explicitly differentiate it from sibling tools like 'get_balance' or 'get_account_info', which might also return balance-related information. The purpose is clear but lacks sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, such as needing account data length, or suggest other tools for related tasks like checking actual balances. Usage is implied only through the parameter 'size', but no explicit context or exclusions are stated.

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