Skip to main content
Glama

faucet

Request test tokens for Sui blockchain wallets on testnet, devnet, or localnet by providing wallet addresses. Simplify testing and development on Sui networks.

Instructions

Get faucet from sui networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressesYes
networkNodevnet

Implementation Reference

  • The core handler function (cb method of SuiFaucetTool) that executes the faucet logic: trims addresses, requests faucet for each on the specified network, and returns success/failed lists.
    async cb(args: FaucetParams) {
      const addresses = args.addresses.map(address => address.trim());
    
      const promises = [];
      for (const address of addresses) {
        promises.push(getFaucet(address, args.network as SuiFaucetNetwork));
      }
    
      const getFaucetResults = await Promise.all(promises);
    
      const result = {
        succeeds: addresses.filter((_, index) => getFaucetResults[index]),
        faileds: addresses.filter((_, index) => !getFaucetResults[index]),
      };
    
      return this.createTextResponse(JSON.stringify(result));
    }
  • Zod schema defining input parameters for the faucet tool: network (enum of testnet/devnet/localnet, default devnet) and array of addresses.
    const faucetParamsSchema = z.object({
      network: z.enum(SUI_FAUCET_NETWORKS).default('devnet'),
      addresses: z.array(z.string()),
    });
  • Registration of the faucet tool: imported as faucetTool from sui/get-faucet.js and included in the exported array of all tools.
    import faucetTool from './sui/get-faucet.js';
    import suiBalanceTool from './sui/get-balance.js';
    import suiTransferTool from './sui/transfer.js';
    import randomSuiAccountTool from './account/gen-random.js';
    import genMnemonicTool from './account/gen-mnemonic.js';
    import genSuiAccountsByMnemonicTool from './account/gen-by-mnemonic.js';
    import getAccountInfoByPriKeyTool from './account/get-info-by-pri-key.js';
    
    export default [
      faucetTool,
      suiBalanceTool,
      suiTransferTool,
      randomSuiAccountTool,
      genMnemonicTool,
      genSuiAccountsByMnemonicTool,
      getAccountInfoByPriKeyTool,
    ];
  • Helper utility function that performs the actual faucet request using @mysten/sui/faucet, returns true on success.
    export async function getFaucet(address: string, network: SuiFaucetNetwork): Promise<boolean> {
      // Request faucet
      try {
        const response = await requestSuiFromFaucetV1({
          host: getFaucetHost(network),
          recipient: address,
        });
    
        // Check if response has error
        if (response?.error) {
          console.error('Invalid response from faucet:', response.error);
          return false;
        }
    
        return true;
      } catch (error) {
        console.error('====Faucet request failed:', error);
    
        return false;
      }
    }
Behavior1/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 but fails completely. It doesn't indicate whether this is a read or write operation, what permissions are required, whether it makes network requests, what side effects occur, or what the typical response looks like. For a tool that likely interacts with blockchain networks, this lack of behavioral information is a critical gap.

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 - a single 5-word phrase. While this represents efficient communication, it's arguably under-specified rather than appropriately concise. Every word earns its place, but more words would be needed to make the description genuinely helpful.

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

Completeness1/5

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

Given the complexity of interacting with blockchain networks, no annotations, no output schema, and 2 parameters with 0% schema description coverage, this description is completely inadequate. It doesn't explain what the tool does, how to use it, what parameters mean, what behavior to expect, or what results will be returned. For a tool in a technical domain like blockchain interaction, this level of incompleteness is unacceptable.

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

Parameters2/5

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

With 0% schema description coverage and 2 parameters, the description provides no information about what 'addresses' or 'network' mean in this context. While the schema shows 'network' has an enum with values like 'testnet' and 'devnet', the description doesn't explain what these networks are, why one would choose between them, or what 'addresses' represents (wallet addresses, contract addresses, etc.). The description fails to compensate for the schema's lack of parameter documentation.

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

Purpose2/5

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

The description 'Get faucet from sui networks' is vague and tautological - it essentially restates the tool name 'faucet' with minimal additional information. While it mentions 'sui networks' as context, it doesn't specify what 'faucet' means in this context (requesting test tokens, accessing a faucet service, etc.) or what the tool actually does beyond the generic term 'get'.

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

Usage Guidelines1/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 the sibling tools like 'sui-balance' or 'sui-transfer'. There's no indication of prerequisites, appropriate contexts, or alternatives. Users must infer usage from the tool name alone, which is insufficient for effective tool selection.

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

Related 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/deanpluse/sui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server