Skip to main content
Glama

create_wallet

create_wallet

Generate a BIP-39 mnemonic and derive a VeChain account key for wallet creation on the VeChain blockchain, with configurable wordlist size and secure private key handling.

Instructions

Generate a BIP-39 mnemonic (12/15/18/21/24 words) and derive the account-level secp256k1 key at path m/44'/818'/0'/0 (VET coin type = 818). By default, the private key is REDACTED in the response. Set includeSecret=true to include it (handle with care).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordlistSizeNoLength of the BIP-39 mnemonic wordlist. Default: 12

Implementation Reference

  • The asynchronous callback function that executes the create_wallet tool. It generates a BIP-39 mnemonic based on wordlistSize, derives the secp256k1 private key and public key address for VeChain, and returns the details in JSON format. Handles errors including timeouts.
    callback: async ({ wordlistSize = 12 }: { wordlistSize?: 12 | 15 | 18 | 21 | 24 }) => {
        try {
            const mnemonic = Mnemonic.of(wordlistSize);
            const secretKey = Mnemonic.toPrivateKey(mnemonic);
            const secretKeyHex = Hex.of(secretKey).toString();
    
            const publicKey = Secp256k1.derivePublicKey(secretKey);
            const publicKeyAddress = Address.ofPublicKey(publicKey).toString();
    
            const result = {
                mnemonic,
                secretKey,
                secretKeyHex,
                publicKey: publicKeyAddress
            };
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(result, null, 2),
                    },
                ],
            };
        } catch (err) {
            const isAbort = (err as Error)?.name === "AbortError";
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(
                            {
                                error: isAbort ? "Request timed out" : "Failed to create wallet",
                                reason: String((err as Error)?.message ?? err),
                            },
                            null,
                            2
                        ),
                    },
                ],
            };
        }
    }
  • Zod input schema defining the optional wordlistSize parameter as a union of literal values 12,15,18,21,24 with description.
    inputSchema: {
        wordlistSize: z
            .union([z.literal(12), z.literal(15), z.literal(18), z.literal(21), z.literal(24)])
            .optional()
            .describe("Length of the BIP-39 mnemonic wordlist. Default: 12")
    },
  • src/server.ts:74-92 (registration)
    Loop that registers each tool in the vechainTools array (imported from tools.ts, which includes create_wallet) with the MCP server. Uses the tool's name, description, inputSchema, and wraps the tool's callback handler.
    for (const t of vechainTools) {
      server.registerTool(
        t.name,
        {
          title: t.name,
          description: t.description,
          inputSchema: t.inputSchema
        },
        async (args) => {
          const result = await t.callback(args);
          return {
            content: result.content.map(item => ({
              ...item,
              type: "text" as const
            }))
          };
        }
      );
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so effectively. It discloses critical behavioral traits: the default behavior (private key redacted), how to override it (includeSecret=true), and security warnings ('handle with care'). It also specifies the derivation path and coin type, adding valuable context beyond basic functionality.

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 front-loaded with the core purpose, followed by key details (derivation path, default behavior, override option). Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

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

Completeness4/5

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

Given the tool's complexity (cryptographic operations) and lack of annotations/output schema, the description is largely complete. It covers purpose, parameters, behavior, and security. A minor gap is the absence of explicit output details (e.g., response format), but this is mitigated by the clear behavioral disclosure.

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

Parameters4/5

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

The input schema has 100% coverage for its single parameter (wordlistSize), so the baseline is 3. The description adds meaningful semantics by explaining the parameter's effect on mnemonic length (12/15/18/21/24 words) and mentioning the default, which enhances understanding beyond the schema's enum and description.

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

Purpose5/5

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

The description clearly states the specific action ('Generate a BIP-39 mnemonic and derive the account-level secp256k1 key') and resource (wallet/key). It distinguishes from siblings by focusing on wallet creation rather than operations like sending tokens or getting balances, making the purpose unambiguous.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (to create a wallet with specific cryptographic details) and includes a caution about handling private keys. However, it does not explicitly state when not to use it or name alternatives among siblings, such as using existing wallet tools instead.

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/leandrogavidia/vechain-mcp-server'

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