Skip to main content
Glama
cuongpo

Rootstock MCP Server

by cuongpo

create_wallet

Generate a new Hyperion wallet with a mnemonic phrase using Rootstock MCP Server. Optionally assign a name to the wallet for easy management.

Instructions

Create a new Hyperion wallet with a generated mnemonic phrase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional name for the wallet

Implementation Reference

  • Core implementation of wallet creation: generates BIP39 mnemonic, creates ethers HD wallet, stores it, and returns WalletInfo including address, privateKey, mnemonic.
    createWallet(_name?: string): WalletInfo {
      try {
        // Generate a random mnemonic
        const mnemonic = bip39.generateMnemonic();
        const wallet = ethers.Wallet.fromPhrase(mnemonic);
        
        // Store the wallet
        this.wallets.set(wallet.address.toLowerCase(), wallet);
        
        // Set as current wallet if it's the first one
        if (!this.currentWallet) {
          this.currentWallet = wallet.address.toLowerCase();
        }
    
        return {
          address: wallet.address,
          privateKey: wallet.privateKey,
          mnemonic,
          publicKey: wallet.publicKey,
        };
      } catch (error) {
        throw new Error(`Failed to create wallet: ${error}`);
      }
    }
  • MCP server handler for 'create_wallet' tool call: delegates to walletManager.createWallet and formats the success response with address and mnemonic.
    private async handleCreateWallet(params: CreateWalletParams) {
      const walletInfo = this.walletManager.createWallet(params.name);
      return {
        content: [
          {
            type: 'text',
            text: `Wallet created successfully!\n\nAddress: ${walletInfo.address}\nMnemonic: ${walletInfo.mnemonic}\n\n⚠️ IMPORTANT: Save your mnemonic phrase securely. It's the only way to recover your wallet!`,
          },
        ],
      };
    }
  • src/index.ts:165-177 (registration)
    Registration of 'create_wallet' tool in getAvailableTools(): defines name, description, and inputSchema for list tools request.
    {
      name: 'create_wallet',
      description: 'Create a new Hyperion wallet with a generated mnemonic phrase',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Optional name for the wallet',
          },
        },
      },
    },
  • TypeScript interface defining parameters for create_wallet handler (name optional, mnemonic optional but unused in create).
    export interface CreateWalletParams {
      name?: string;
      mnemonic?: string;
    }
  • Alternative handler and registration in Smithery server using McpServer.tool() with Zod schema, delegates to walletManager.createWallet.
    server.tool(
      "create_wallet",
      "Create a new Rootstock wallet with a generated mnemonic phrase",
      {
        name: z.string().optional().describe("Optional name for the wallet"),
      },
      async ({ name }) => {
        try {
          const walletInfo = walletManager.createWallet(name);
          return {
            content: [
              {
                type: "text",
                text: `Wallet created successfully!\n\nAddress: ${walletInfo.address}\nMnemonic: ${walletInfo.mnemonic}\n\n⚠️ IMPORTANT: Save your mnemonic phrase securely. It's the only way to recover your wallet!`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error creating wallet: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the wallet is 'new' and uses a 'generated mnemonic phrase', which hints at creation behavior, but lacks critical details like whether this requires authentication, what happens if a wallet already exists, if the mnemonic is stored securely, or any rate limits. For a tool that likely involves sensitive operations, this is insufficient.

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 a single, efficient sentence that front-loads the core action ('Create a new Hyperion wallet') and adds necessary detail ('with a generated mnemonic phrase') without any wasted words. It is appropriately sized for the tool's complexity.

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 lack of annotations and output schema, and the tool's likely complexity (creating a cryptographic wallet), the description is incomplete. It misses behavioral details (e.g., security implications, error handling) and does not explain return values (e.g., wallet address, mnemonic). For a tool with no structured safety or output information, more descriptive context is needed.

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% description coverage for its single parameter ('name'), so the baseline is 3. The description adds value by clarifying the overall purpose (creating a wallet with a mnemonic), which provides context for the optional 'name' parameter, but does not elaborate on parameter-specific semantics beyond what the schema states.

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 ('Create a new Hyperion wallet') and the resource ('wallet'), with additional detail about the method ('with a generated mnemonic phrase'). It distinguishes from sibling tools like 'import_wallet' (which imports existing wallets) and 'list_wallets' (which lists existing ones).

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 implies usage context by specifying 'new' wallet creation with a generated mnemonic, suggesting this is for initial setup rather than importing existing wallets. However, it does not explicitly state when not to use it (e.g., for existing wallets) or name alternatives like 'import_wallet', leaving some guidance implicit.

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/cuongpo/rootstock-mcp'

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