Skip to main content
Glama

helius_get_minimum_balance_for_rent_exemption

Calculate the minimum SOL balance needed for rent exemption on Solana based on data size and commitment level.

Instructions

Get the minimum balance required for rent exemption

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataSizeYes
commitmentNo

Implementation Reference

  • The main handler function that executes the tool logic by calling the Helius connection's getMinimumBalanceForRentExemption method with the provided dataSize and commitment.
    export const getMinimumBalanceForRentExemptionHandler = async (input: GetMinimumBalanceForRentExemptionInput): Promise<ToolResultSchema> => { try { const minBalance = await (helius as any as Helius).connection.getMinimumBalanceForRentExemption(input.dataSize, input.commitment); return createSuccessResponse(`Minimum balance for rent exemption: ${minBalance}`); } catch (error) { return createErrorResponse(`Error getting minimum balance: ${error instanceof Error ? error.message : String(error)}`); } }
  • The MCP tool definition including the input schema for validation of dataSize (required number) and optional commitment level.
    { name: "helius_get_minimum_balance_for_rent_exemption", description: "Get the minimum balance required for rent exemption", inputSchema: { type: "object", properties: { dataSize: { type: "number" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["dataSize"] } },
  • src/tools.ts:563-563 (registration)
    Mapping of the tool name to its handler function in the central handlers dictionary used for tool execution.
    "helius_get_minimum_balance_for_rent_exemption": getMinimumBalanceForRentExemptionHandler,
  • TypeScript interface defining the input shape for the handler function, matching the MCP schema.
    export type GetMinimumBalanceForRentExemptionInput = { dataSize: number; commitment?: "confirmed" | "finalized" | "processed"; }

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