Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_owned_objects

Retrieve objects owned by a specific Sui blockchain address, with options to filter results, paginate through data, and select network type.

Instructions

Get objects owned by an address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesSui address
cursorNoOptional: Pagination cursor
limitNoOptional: Number of results to return
networkNoNetwork type (defaults to mainnet)
queryNoOptional: Query filter and options

Implementation Reference

  • Handler logic in handleSuiTool switch case: extracts parameters from args, invokes SuiService.getOwnedObjects, formats result as MCP response.
    case 'get_sui_owned_objects': { const address = args?.address as string; const query = args?.query as any; const cursor = args?.cursor as string | undefined; const limit = args?.limit as number | undefined; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getOwnedObjects(address, query, cursor, limit, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Input schema, name, and description for the 'get_sui_owned_objects' tool defined in registerSuiHandlers.
    { name: 'get_sui_owned_objects', description: 'Get objects owned by an address', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Sui address', }, query: { type: 'object', description: 'Optional: Query filter and options', }, cursor: { type: 'string', description: 'Optional: Pagination cursor', }, limit: { type: 'number', description: 'Optional: Number of results to return', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], }, },
  • Core implementation in SuiService.getOwnedObjects: retrieves Sui RPC service and calls 'suix_getOwnedObjects' RPC method with constructed parameters.
    async getOwnedObjects( address: string, query?: { filter?: any; options?: any; }, cursor?: string, limit?: number, 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}`, }; } const params: any[] = [address]; if (query) params.push(query); if (cursor) params.push(cursor); if (limit) params.push(limit); return this.blockchainService.callRPCMethod(service.id, 'suix_getOwnedObjects', params); }

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