Skip to main content
Glama

gen_mnemonic

Generate mnemonic phrases for Sui blockchain wallets. Designed for testing purposes and not recommended for production use, it creates secure phrases to manage wallet access.

Instructions

Generate mnemonic(Not recommended for production)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numNo

Implementation Reference

  • The GenMnemonicTool class implements the core logic for the 'gen_mnemonic' tool. It extends BaseTool, sets the name and description, defines the paramsSchema, and provides the 'cb' async handler function that generates the specified number of random mnemonics using genRandomMnemonic and returns them as a JSON string response.
    export class GenMnemonicTool extends BaseTool<MnemonicParams> {
      name = 'gen_mnemonic';
      description = 'Generate mnemonic(Not recommended for production)';
      paramsSchema = mnemonicParamsSchema;
    
      async cb(args: MnemonicParams) {
        const mnemonics = [];
        for (let i = 0; i < args.num; i++) {
          const mnemonic = genRandomMnemonic();
          mnemonics.push(mnemonic);
        }
    
        return this.createTextResponse(JSON.stringify(mnemonics));
      }
    }
  • Zod schema and TypeScript type for the tool's input parameters: 'num' number defaulting to 1, indicating how many mnemonics to generate.
    const mnemonicParamsSchema = z.object({
      num: z.number().default(1),
    });
    
    type MnemonicParams = z.output<typeof mnemonicParamsSchema>;
  • The genMnemonicTool instance is included in the default export array of all tools from src/tools/index.ts, serving as the central registration point for MCP tools.
    export default [
      faucetTool,
      suiBalanceTool,
      suiTransferTool,
      randomSuiAccountTool,
      genMnemonicTool,
      genSuiAccountsByMnemonicTool,
      getAccountInfoByPriKeyTool,
    ];
  • Instantiation and default export of the GenMnemonicTool instance, which is imported and registered in src/tools/index.ts.
    export default new GenMnemonicTool();
  • Supporting utility function genRandomMnemonic() that uses bip39.generateMnemonic() to produce a random mnemonic phrase, invoked in the tool's handler.
    export function genRandomMnemonic() {
      const mnemonic = bip39.generateMnemonic();
    
      return mnemonic;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions a security warning ('Not recommended for production'), which hints at potential risks, but doesn't describe what the tool actually does (e.g., generates a BIP39 mnemonic, returns a string, requires no authentication, has no side effects). This leaves significant gaps in understanding the tool's behavior.

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 extremely concise with just two words and a parenthetical warning, making it front-loaded and free of unnecessary details. Every element ('Generate mnemonic' and the warning) serves a clear purpose without waste.

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 complexity (a tool that likely generates cryptographic mnemonics), lack of annotations, no output schema, and poor parameter documentation, the description is incomplete. It doesn't explain what a mnemonic is, how it's used, what the output looks like, or the implications of the security warning, leaving the agent with insufficient context.

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

Parameters1/5

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

The input schema has one parameter ('num') with 0% description coverage, and the tool description provides no information about parameters. The description doesn't mention 'num' or explain what it controls (e.g., number of mnemonics to generate), failing to compensate for the lack of schema documentation.

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 tool's purpose: 'Generate mnemonic'. It uses a specific verb ('Generate') and identifies the resource ('mnemonic'), making the action clear. However, it doesn't differentiate from sibling tools like 'gen_sui_accounts_by_mnemonic' or explain what type of mnemonic is generated (e.g., cryptographic seed phrase).

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 a warning ('Not recommended for production') which offers some usage context about security concerns. However, it doesn't specify when to use this tool versus alternatives like 'gen_sui_accounts_by_mnemonic' or 'random-sui-account', nor does it explain prerequisites or typical use cases beyond the warning.

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