Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_object

Retrieve detailed information about Sui blockchain objects using their unique ID, including type, ownership, content, and transaction history.

Instructions

Get object details by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNetwork type (defaults to mainnet)
objectIdYesSui object ID
optionsNoOptional: Display options

Implementation Reference

  • MCP tool handler implementation for 'get_sui_object'. Extracts parameters and calls SuiService.getObject, formats response.
    case 'get_sui_object': { const objectId = args?.objectId as string; const options = args?.options as any; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getObject(objectId, options, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Tool registration including name, description, and input schema for 'get_sui_object'. Returned by registerSuiHandlers.
    { name: 'get_sui_object', description: 'Get object details by ID', inputSchema: { type: 'object', properties: { objectId: { type: 'string', description: 'Sui object ID', }, options: { type: 'object', description: 'Optional: Display options', properties: { showType: { type: 'boolean' }, showOwner: { type: 'boolean' }, showPreviousTransaction: { type: 'boolean' }, showDisplay: { type: 'boolean' }, showContent: { type: 'boolean' }, showBcs: { type: 'boolean' }, showStorageRebate: { type: 'boolean' }, }, }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['objectId'], }, },
  • Core implementation of getObject in SuiService, which constructs RPC parameters and calls blockchainService.callRPCMethod('sui_getObject').
    async getObject( objectId: string, options?: { showType?: boolean; showOwner?: boolean; showPreviousTransaction?: boolean; showDisplay?: boolean; showContent?: boolean; showBcs?: boolean; showStorageRebate?: boolean; }, 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[] = [objectId]; if (options) { params.push({ showType: options.showType, showOwner: options.showOwner, showPreviousTransaction: options.showPreviousTransaction, showDisplay: options.showDisplay, showContent: options.showContent, showBcs: options.showBcs, showStorageRebate: options.showStorageRebate, }); } return this.blockchainService.callRPCMethod(service.id, 'sui_getObject', 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