Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_all_balances

Retrieve complete coin balance information for any Sui blockchain address across mainnet or testnet networks.

Instructions

Get all coin balances for a Sui address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesSui address
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool registration definition including name, description, and input schema for get_sui_all_balances.
    { name: 'get_sui_all_balances', description: 'Get all coin balances for a Sui address', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Sui address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], }, },
  • Handler execution logic for the get_sui_all_balances tool. Extracts arguments, calls SuiService.getAllBalances, and returns formatted response.
    case 'get_sui_all_balances': { const address = args?.address as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getAllBalances(address, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Core helper function implementing getAllBalances by invoking the Sui RPC method 'suix_getAllBalances' via blockchain service.
    async getAllBalances( address: string, 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_getAllBalances', [address] ); }

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