Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_fee_for_message

Calculate transaction fees for Solana blockchain operations by providing a base64-encoded message, supporting both mainnet and testnet networks.

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

  • MCP tool handler case that extracts arguments, calls solanaService.getFeeForMessage, and formats the response.
    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, }; }
  • Tool registration including name, description, and input schema, returned by registerSolanaHandlers.
    { 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'], }, },
  • Service method that resolves the Solana RPC endpoint and calls getFeeForMessage RPC method with the base64 message.
    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] ); }

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