Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

query_sui_transactions

Retrieve and filter Sui blockchain transactions by network, pagination, and custom query parameters using Grove's MCP Server.

Instructions

Query Sui transactions with filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesQuery filter and options
cursorNoOptional: Pagination cursor
limitNoOptional: Number of results to return
descendingOrderNoOptional: Sort order (default: false)
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Executes the query_sui_transactions tool by extracting arguments, calling SuiService.queryTransactions, and formatting the JSON response.
    case 'query_sui_transactions': {
      const query = args?.query as any;
      const cursor = args?.cursor as string | undefined;
      const limit = args?.limit as number | undefined;
      const descendingOrder = args?.descendingOrder as boolean | undefined;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await suiService.queryTransactions(
        query,
        cursor,
        limit,
        descendingOrder,
        network
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Tool schema defining name, description, and inputSchema for query_sui_transactions.
    {
      name: 'query_sui_transactions',
      description: 'Query Sui transactions with filters',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'object',
            description: 'Query filter and options',
          },
          cursor: {
            type: 'string',
            description: 'Optional: Pagination cursor',
          },
          limit: {
            type: 'number',
            description: 'Optional: Number of results to return',
          },
          descendingOrder: {
            type: 'boolean',
            description: 'Optional: Sort order (default: false)',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['query'],
      },
    },
  • src/index.ts:88-101 (registration)
    Registers Sui tools (including query_sui_transactions) by spreading registerSuiHandlers into the main tools array used for MCP tool listing.
    const tools: Tool[] = [
      ...registerBlockchainHandlers(server, blockchainService),
      ...registerDomainHandlers(server, domainResolver),
      ...registerTransactionHandlers(server, advancedBlockchain),
      ...registerTokenHandlers(server, advancedBlockchain),
      ...registerMultichainHandlers(server, advancedBlockchain),
      ...registerContractHandlers(server, advancedBlockchain),
      ...registerUtilityHandlers(server, advancedBlockchain),
      ...registerEndpointHandlers(server, endpointManager),
      ...registerSolanaHandlers(server, solanaService),
      ...registerCosmosHandlers(server, cosmosService),
      ...registerSuiHandlers(server, suiService),
      ...registerDocsHandlers(server, docsManager),
    ];
  • Helper method in SuiService that builds RPC call parameters for querying transactions via 'suix_queryTransactionBlocks' RPC method.
    async queryTransactions(
      query: {
        filter?: any;
        options?: any;
      },
      cursor?: string,
      limit?: number,
      descendingOrder?: 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[] = [query];
      if (cursor !== undefined) params.push(cursor);
      if (limit !== undefined) params.push(limit);
      if (descendingOrder !== undefined) params.push(descendingOrder);
    
      return this.blockchainService.callRPCMethod(
        service.id,
        'suix_queryTransactionBlocks',
        params
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It mentions 'with filters' which hints at querying capabilities, but doesn't describe what the tool returns, whether it's paginated (though cursor parameter suggests it is), rate limits, authentication requirements, or error conditions. This is inadequate for a tool with 5 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 5 words, which is efficient. However, it's arguably too brief given the tool's complexity (5 parameters, no output schema, no annotations). While not wasteful, it may be under-specified rather than appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters including nested objects, no annotations, no output schema, and many sibling tools), the description is insufficient. It doesn't explain what the tool returns, how results are structured, what query filters are available, or how this differs from other transaction-related tools. The minimal description leaves too many gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, so all parameters are documented in the structured schema. The description adds no additional parameter information beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete, but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('query') and resource ('Sui transactions'), making the purpose understandable. However, it doesn't differentiate this tool from similar siblings like 'get_sui_transaction' or 'query_sui_events', which would require more specificity about what makes this transaction querying unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools available (including other Sui-related tools like 'get_sui_transaction' and 'query_sui_events'), there's no indication of when this filtered query approach is preferable to simpler retrieval methods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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