Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_transaction

Retrieve Sui blockchain transaction details using a transaction digest. Access transaction data, effects, events, and balance changes through Grove's Pocket Network server.

Instructions

Get Sui transaction details by digest

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txDigestYesTransaction digest (hash)
optionsNoOptional: Display options
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool schema definition with input validation schema for get_sui_transaction
    { name: 'get_sui_transaction', description: 'Get Sui transaction details by digest', inputSchema: { type: 'object', properties: { txDigest: { type: 'string', description: 'Transaction digest (hash)', }, options: { type: 'object', description: 'Optional: Display options', properties: { showInput: { type: 'boolean' }, showEffects: { type: 'boolean' }, showEvents: { type: 'boolean' }, showObjectChanges: { type: 'boolean' }, showBalanceChanges: { type: 'boolean' }, }, }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['txDigest'], }, },
  • MCP tool handler logic: extracts parameters from args and calls SuiService.getTransaction, formats response
    case 'get_sui_transaction': { const txDigest = args?.txDigest as string; const options = args?.options as any; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await suiService.getTransaction(txDigest, options, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Core helper function implementing the transaction fetch via Sui RPC 'sui_getTransactionBlock'
    async getTransaction( txDigest: string, options?: { showInput?: boolean; showEffects?: boolean; showEvents?: boolean; showObjectChanges?: boolean; showBalanceChanges?: 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[] = [txDigest]; if (options) { params.push({ showInput: options.showInput ?? true, showEffects: options.showEffects ?? true, showEvents: options.showEvents ?? true, showObjectChanges: options.showObjectChanges, showBalanceChanges: options.showBalanceChanges, }); } return this.blockchainService.callRPCMethod( service.id, 'sui_getTransactionBlock', params ); }
  • src/index.ts:98-101 (registration)
    Registration of Sui tools (including get_sui_transaction) by calling registerSuiHandlers and including in the tools list for the MCP server.
    ...registerCosmosHandlers(server, cosmosService), ...registerSuiHandlers(server, suiService), ...registerDocsHandlers(server, docsManager), ];

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