Skip to main content
Glama

helius_get_priority_fee_estimate

Estimate transaction priority fees on Solana to optimize confirmation speed and cost, using Helius API data for accurate fee calculations.

Instructions

Get priority fee estimate for a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountKeysNo
optionsNo

Implementation Reference

  • The handler function implementing the tool logic. It calls the Helius RPC getPriorityFeeEstimate method with the provided accountKeys and options, then formats the response.
    export const getPriorityFeeEstimateHandler = async (input: GetPriorityFeeEstimateInput): Promise<ToolResultSchema> => {
      try {
        // This function has parameter type mismatches
        const result = await (helius as any as Helius).rpc.getPriorityFeeEstimate({
          accountKeys: input.accountKeys,
          options: {
            priorityLevel: input.options?.priorityLevel as PriorityLevel,
            includeAllPriorityFeeLevels: input.options?.includeAllPriorityFeeLevels
          }
        });
        return createSuccessResponse(`Priority fee estimate: ${JSON.stringify(result.priorityFeeEstimate, null, 2)}
        priorityFeeLevels: ${JSON.stringify(result.priorityFeeLevels ?? [], null, 2)}
        `);
      } catch (error) {
        return createErrorResponse(`Error getting priority fee estimate: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • The input schema defining the parameters for the tool: accountKeys (array of strings) and optional options (priorityLevel and includeAllPriorityFeeLevels).
    {
      name: 'helius_get_priority_fee_estimate',
      description: 'Get priority fee estimate for a transaction',
      inputSchema: {
        type: 'object',
        properties: {
          accountKeys: { type: 'array', items: { type: 'string' } },
          options: {
            type: 'object',
            properties: {
              priorityLevel: { type: 'string', enum: ['default', 'high', 'max'] },
              includeAllPriorityFeeLevels: { type: 'boolean' }
            }
          }
        }
      }
    },
  • src/tools.ts:585-585 (registration)
    Maps the tool name to its handler function in the central handlers dictionary.
    "helius_get_priority_fee_estimate": helius.getPriorityFeeEstimateHandler,
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 'Get[s] priority fee estimate' but doesn't describe what the estimate includes (e.g., units, time validity), whether it's a read-only operation, potential rate limits, or error conditions. This leaves significant gaps for a tool that likely interacts with blockchain data.

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 with no wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly.

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 of blockchain fee estimation, no annotations, no output schema, and low parameter coverage, the description is incomplete. It lacks details on behavior, return values, error handling, and usage context, which are critical for effective tool invocation in this domain.

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?

With 0% schema description coverage for 2 parameters, the description doesn't add any meaning beyond the schema. It doesn't explain what 'accountKeys' represents (e.g., transaction accounts) or the 'options' object's purpose (e.g., priority levels like 'default', 'high', 'max'), leaving parameters largely undocumented.

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 ('priority fee estimate for a transaction'), making the purpose understandable. It distinguishes this as a fee estimation tool rather than execution or other operations, though it doesn't explicitly differentiate from sibling tools like 'helius_get_fee_for_message' which might have overlapping domains.

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 doesn't mention sibling tools like 'helius_get_fee_for_message' or explain scenarios where priority fee estimation is needed, such as before submitting transactions or comparing fee levels.

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