Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_reference_gas_price

Retrieve the reference gas price for Sui blockchain transactions to calculate accurate network fees before submitting operations.

Instructions

Get reference gas price for Sui transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Core handler implementation: Retrieves the Sui RPC service and calls 'suix_getReferenceGasPrice' RPC method to get the reference gas price.
    async getReferenceGasPrice( network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain('sui', network); if (!service) { return { success: false, error: `Sui service not found for ${network}`, }; } return this.blockchainService.callRPCMethod(service.id, 'suix_getReferenceGasPrice', []); }
  • MCP tool handler case: Extracts network from args, calls SuiService.getReferenceGasPrice, formats response as MCP content.
    case 'get_sui_reference_gas_price': { const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getReferenceGasPrice(network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Tool registration: Defines name, description, and input schema. Returned by registerSuiHandlers and included in server's tools list.
    { name: 'get_sui_reference_gas_price', description: 'Get reference gas price for Sui transactions', inputSchema: { type: 'object', properties: { network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, }, },
  • Input schema for the tool: Optional network parameter (mainnet/testnet).
    inputSchema: { type: 'object', properties: { network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, }, },

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