Skip to main content
Glama
buildwithgrove

Grove Public Endpoints MCP Server

Official

get_sui_reference_gas_price

Retrieve the reference gas price for Sui blockchain transactions to estimate 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

  • MCP tool handler that extracts the network parameter, calls SuiService.getReferenceGasPrice, and returns a formatted text response with the result.
    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, }; }
  • Input schema definition and tool metadata for get_sui_reference_gas_price, part of the tools registered via registerSuiHandlers.
    { 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)', }, }, }, },
  • src/index.ts:99-101 (registration)
    Registration of Sui handlers (including get_sui_reference_gas_price tool) with the MCP server by calling registerSuiHandlers and adding to the tools list.
    ...registerSuiHandlers(server, suiService), ...registerDocsHandlers(server, docsManager), ];
  • Helper method in SuiService that fetches the Sui RPC endpoint for the network and invokes the 'suix_getReferenceGasPrice' RPC method.
    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', []); } }

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'

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