Skip to main content
Glama

gen_sui_accounts_by_mnemonic

Generate multiple SUI blockchain accounts from a single mnemonic phrase for testing purposes, enabling easy account creation in development environments.

Instructions

Create SUI accounts from mnemonic(Not recommended for production)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mnemonicYes
numNo

Implementation Reference

  • GenSuiAccountsByMnemonicTool class: defines the tool name, description, schema reference, and the cb method implementing the core logic to generate multiple SUI accounts from a mnemonic using helper functions.
    export class GenSuiAccountsByMnemonicTool extends BaseTool<GenByMnemonicParams> {
      name = 'gen_sui_accounts_by_mnemonic';
      description = 'Create SUI accounts from mnemonic(Not recommended for production)';
      paramsSchema = genByMnemonicParamsSchema;
    
      async cb(args: GenByMnemonicParams) {
        if (!args.mnemonic) {
          throw new Error('Mnemonic is required');
        }
    
        const { mnemonic, num } = args;
        const accountInfos = [];
        for (let i = 0; i < num; i++) {
          const keypair = getKeypairFromMnemonic(mnemonic, i);
          const accountInfo = getAccountInfoFromKeypair(keypair);
          accountInfos.push(accountInfo);
        }
    
        const result = {
          mnemonic: mnemonic,
          accounts: accountInfos,
        };
    
        return this.createTextResponse(JSON.stringify(result));
      }
    }
  • Zod schema for input parameters: mnemonic (string, required), num (number, default 1). Type alias GenByMnemonicParams.
    const genByMnemonicParamsSchema = z.object({
      mnemonic: z.string(),
      num: z.number().default(1),
    });
    
    type GenByMnemonicParams = z.output<typeof genByMnemonicParamsSchema>;
  • The tool is imported from its implementation file and included in the default-exported array of all tools, serving as the registration point.
    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,
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. It mentions that the tool creates accounts from a mnemonic and warns against production use, but it doesn't cover critical aspects like whether this is a read-only or write operation, what permissions are needed, rate limits, or what the output looks like. The warning adds some value but leaves significant gaps.

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 a single, efficient sentence that conveys the core purpose and a key warning without unnecessary words. It's appropriately sized and front-loaded with the main action, though it could be slightly more structured for clarity.

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 (creating accounts, which implies a write operation), no annotations, no output schema, and low schema description coverage, the description is incomplete. It misses details on behavioral traits, output format, and full parameter semantics, making it inadequate for safe and effective use by an AI agent.

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 input schema has 2 parameters with 0% description coverage, so the schema provides no semantic details. The description implies the 'mnemonic' parameter is used to generate accounts and hints at 'num' through 'accounts' (plural), but it doesn't explicitly explain what 'num' does or provide format details for 'mnemonic'. This adds marginal value but doesn't fully compensate for the schema's lack of descriptions.

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 'Create' and the resource 'SUI accounts from mnemonic', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'gen_mnemonic' or 'random-sui-account', which might also generate accounts or mnemonics in different ways.

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 includes a warning 'Not recommended for production', which provides some context on when not to use it, but it lacks explicit guidance on when to use this tool versus alternatives like 'random-sui-account' or 'gen_mnemonic'. No prerequisites or specific scenarios are mentioned.

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