Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_sui_coins

Retrieve Sui blockchain coin holdings for any address, with options to filter by coin type, paginate results, and select network.

Instructions

Get coins owned by an address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesSui address
coinTypeNoOptional: Coin type to filter (e.g., "0x2::sui::SUI")
cursorNoOptional: Pagination cursor
limitNoOptional: Number of results to return
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Handler function for the 'get_sui_coins' tool. Extracts parameters from args and calls suiService.getCoins to fetch coins owned by the address.
    case 'get_sui_coins': {
      const address = args?.address as string;
      const coinType = args?.coinType as string | undefined;
      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.getCoins(address, coinType, cursor, limit, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Tool registration for 'get_sui_coins', including name, description, and input schema definition used by the MCP server.
    {
      name: 'get_sui_coins',
      description: 'Get coins owned by an address',
      inputSchema: {
        type: 'object',
        properties: {
          address: {
            type: 'string',
            description: 'Sui address',
          },
          coinType: {
            type: 'string',
            description: 'Optional: Coin type to filter (e.g., "0x2::sui::SUI")',
          },
          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'],
      },
    },
  • Helper method in SuiService that constructs RPC parameters and calls the 'suix_getCoins' RPC method via blockchainService to retrieve coins.
    async getCoins(
      address: string,
      coinType?: string,
      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 (coinType) params.push(coinType);
      if (cursor) params.push(cursor);
      if (limit) params.push(limit);
    
      return this.blockchainService.callRPCMethod(service.id, 'suix_getCoins', params);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Get' implies a read operation, the description doesn't mention whether this requires authentication, has rate limits, returns paginated results, or what the output format looks like. For a tool with 5 parameters and no output schema, this is a significant gap.

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

Conciseness5/5

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

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a straightforward data retrieval tool and gets directly to the point.

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?

For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'coins' means in this context, how results are structured, whether pagination is required for large result sets, or how this differs from similar sibling tools. The agent would need to guess about many behavioral aspects.

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 doesn't add any additional semantic context about the parameters beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

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 verb ('Get') and resource ('coins owned by an address'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'get_sui_all_balances' or 'get_sui_balance', which appear to serve similar purposes in the same blockchain context.

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 like 'get_sui_all_balances' or 'get_sui_balance'. There's no mention of prerequisites, typical use cases, or exclusions, leaving the agent to infer usage from the tool name alone.

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