Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_fee_for_message

Calculate Solana transaction fees for base64-encoded messages on mainnet or testnet networks to estimate costs before execution.

Instructions

Estimate fee for a serialized Solana message (base64)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesSerialized message in base64
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool registration definition including name, description, and input schema for 'get_solana_fee_for_message'
    {
      name: 'get_solana_fee_for_message',
      description: 'Estimate fee for a serialized Solana message (base64)',
      inputSchema: {
        type: 'object',
        properties: {
          message: {
            type: 'string',
            description: 'Serialized message in base64',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['message'],
      },
    },
  • Dispatcher handler case in handleSolanaTool function that calls SolanaService.getFeeForMessage with parsed arguments
    case 'get_solana_fee_for_message': {
      const message = args?.message as string;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await solanaService.getFeeForMessage(message, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Core implementation in SolanaService.getFeeForMessage that retrieves Solana RPC service and calls getFeeForMessage RPC method
    async getFeeForMessage(
      message: string,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      const service = this.blockchainService.getServiceByBlockchain('solana', network);
    
      if (!service) {
        return {
          success: false,
          error: `Solana service not found for ${network}`,
        };
      }
    
      return this.blockchainService.callRPCMethod(
        service.id,
        'getFeeForMessage',
        [message]
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool estimates fees, implying a read-only operation, but doesn't clarify if it's a simulation, requires network access, has rate limits, or returns specific error conditions. For a tool with zero annotation coverage, this is a significant gap 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.

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. It directly states what the tool does and includes a key constraint (base64 format), making it zero waste and well-structured for quick comprehension.

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 (fee estimation with two parameters) and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on return values, error handling, or behavioral traits. With no annotations and incomplete behavioral transparency, it meets the minimum viable threshold but has clear gaps.

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

Parameters3/5

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

The input schema has 100% description coverage, with clear documentation for both parameters ('message' as base64 serialized message, 'network' as an enum with default). The description adds no additional parameter semantics beyond what the schema provides, such as message format details or network implications. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Estimate fee for a serialized Solana message (base64)'. It specifies the verb ('estimate fee'), resource ('Solana message'), and format constraint ('base64'), making the function unambiguous. However, it doesn't differentiate from sibling tools like 'estimate_gas' or 'get_solana_prioritization_fees', which prevents a score of 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 sibling tools like 'estimate_gas' (for other blockchains) or 'get_solana_prioritization_fees' (for Solana-specific fee estimation), nor does it specify prerequisites or exclusions. This leaves the agent without context for tool selection.

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/buildwithgrove/mcp-pocket'

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