Skip to main content
Glama

wallet_create_mnemonic_phrase

Generate a secure mnemonic phrase for Ethereum and EVM-compatible wallets, with customizable length and optional locale support for enhanced usability.

Instructions

Create a mnemonic phrase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lengthYesThe length of the mnemonic phrase
localeNoOptional locale for the wordlist

Implementation Reference

  • The main handler function that generates a mnemonic phrase of the specified length using the @scure/bip39 library. It dynamically imports the wordlist based on locale and calculates entropy bits from the word count.
    export const createMnemonicPhraseHandler = async (input: createMnemonicPhraseHandlerInput): Promise<ToolResultSchema> => {
      try {
        const { wordlist } = await import(`@scure/bip39/wordlists/${input.locale || 'english'}`);
        if (!wordlist) {
          return createErrorResponse("Invalid locale");
        }
        // Convert length to entropy bits (12 words = 128 bits, 15 words = 160 bits, etc)
        const entropyBits = ((input.length ?? 12) / 3) * 32;
        const mnemonic = generateMnemonic(wordlist, entropyBits);
    
        return createSuccessResponse(
        `Mnemonic phrase created successfully:
          Mnemonic: "${mnemonic}"
        `);
      } catch (error) {
        return createErrorResponse(`Failed to create mnemonic phrase: ${(error as Error).message}`);
      }
    };
  • The tool schema definition including name, description, and input schema specifying the length (12-24 words) and optional locale.
    {
      name: "wallet_create_mnemonic_phrase",
      description: "Create a mnemonic phrase",
      inputSchema: {
        type: "object",
        properties: {
          length: { type: "number", description: "The length of the mnemonic phrase", enum: [12, 15, 18, 21, 24] },
          locale: { type: "string", description: "Optional locale for the wordlist" }
        },
        required: ["length"]
      }
    },
  • src/tools.ts:607-607 (registration)
    Registration of the handler function in the tools handlers dictionary.
    "wallet_create_mnemonic_phrase": createMnemonicPhraseHandler
  • TypeScript type definition for the handler input, matching the tool schema.
    export type createMnemonicPhraseHandlerInput = {
      locale?: string;
      length?: 12 | 15 | 18 | 21 | 24;
    };
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. 'Create a mnemonic phrase' implies a write operation that generates new data, but it doesn't disclose critical traits such as whether this is a deterministic or random process, if it requires specific permissions, what the output format is (e.g., a list of words), or any security considerations (e.g., should be stored securely). The description is too vague to inform safe and effective use.

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 a single sentence, 'Create a mnemonic phrase,' which is front-loaded and wastes no words. While under-specified, it efficiently states the core action without redundancy or fluff. Every word earns its place by directly addressing the tool's function, making it structurally sound despite its brevity.

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 of wallet-related operations and the lack of annotations and output schema, the description is incomplete. It doesn't explain what a mnemonic phrase is, how it's used in the wallet ecosystem, what the tool returns (e.g., a phrase string or object), or behavioral aspects like security implications. For a tool that likely generates sensitive cryptographic data, this minimal description fails to provide adequate context for safe and informed 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 input schema has 100% description coverage, with clear documentation for both parameters ('length' with enum values and 'locale' as optional). The description adds no parameter semantics beyond what the schema provides—it doesn't explain the significance of length choices (e.g., 12 words for standard security) or locale usage (e.g., language for wordlist). Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but the description misses opportunities to enhance understanding.

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 'Create a mnemonic phrase' is a tautology that essentially restates the tool name 'wallet_create_mnemonic_phrase' without adding specificity. It doesn't clarify what a mnemonic phrase is used for (e.g., wallet seed generation), how it differs from sibling tools like 'wallet_create_random' (which might create random keys without mnemonics), or what resource it creates. This minimal statement fails to provide meaningful context beyond the obvious.

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 alternatives. It doesn't mention sibling tools like 'wallet_from_mnemonic' (which uses a mnemonic) or 'wallet_create_random' (which might generate keys differently), nor does it specify prerequisites, use cases (e.g., initial wallet setup), or exclusions. Without any context, users must infer usage from the 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/dcSpark/mcp-cryptowallet-evm'

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