Skip to main content
Glama
fakepixels

Base Network MCP Server

by fakepixels

create_wallet

Generate a new wallet on the Base Network MCP Server to manage blockchain assets, execute transactions, and check balances. Optional wallet naming available for organization.

Instructions

Create a new wallet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional name for the wallet

Implementation Reference

  • Main handler function for the 'create_wallet' tool. Validates args, calls createWallet helper, formats and returns the response.
    async function handleCreateWallet(args: CreateWalletArgs): Promise<any> {
      try {
        const wallet = createWallet(args.name);
        
        return {
          success: true,
          message: `Created new wallet "${wallet.name}" with address ${wallet.address}`,
          wallet: {
            name: wallet.name,
            address: wallet.address
          }
        };
      } catch (error) {
        console.error('Error creating wallet:', error);
        throw error;
      }
    }
  • MCP CallToolRequestSchema handler case that dispatches 'create_wallet' tool calls to handleCreateWallet and returns MCP-formatted response.
    case 'create_wallet': {
      const result = await toolHandlers.handleCreateWallet({
        name: typeof args.name === 'string' ? args.name : undefined,
      });
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Tool registration in ListToolsRequestSchema response, defining name, description, and input schema for 'create_wallet'.
      name: 'create_wallet',
      description: 'Create a new wallet',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Optional name for the wallet',
          },
        },
      },
    },
  • TypeScript interface defining the input arguments for create_wallet tool.
    export interface CreateWalletArgs {
      name?: string; // Optional wallet name
    }
  • Core helper function that generates a new wallet using viem, stores it in memory, and returns wallet details.
    export function createWallet(name?: string): Wallet {
      // Generate a random private key
      const privateKey = generatePrivateKey();
      const account = privateKeyToAccount(privateKey);
      
      // Use provided name or generate a random one
      const walletName = name || `wallet_${Object.keys(walletStore).length + 1}`;
      
      // Store the wallet
      const wallet: Wallet = {
        address: account.address,
        privateKey: privateKey,
        name: walletName
      };
      
      walletStore[walletName] = wallet;
      console.log(`Created new wallet: ${wallet.address} with name: ${walletName}`);
      
      return wallet;
    }
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 states 'Create a new wallet' but does not disclose whether this requires authentication, what happens on failure, if there are rate limits, or what the expected output is. This leaves significant gaps for a mutation tool.

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 with zero waste. It is appropriately sized and front-loaded, clearly stating the tool's action without unnecessary elaboration.

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 this is a mutation tool with no annotations, no output schema, and minimal behavioral disclosure, the description is incomplete. It does not address key aspects like what a wallet is, the creation process, or potential errors, making it inadequate for safe and effective 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?

Schema description coverage is 100%, with the single parameter 'name' documented as 'Optional name for the wallet'. The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema does the heavy lifting without compensation needed.

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 new wallet' restates the tool name 'create_wallet' without adding specificity about what a wallet is or what resources it creates. It distinguishes from siblings like 'check_balance' and 'list_wallets' by implying creation vs. querying, but lacks detail about the wallet's purpose or context.

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?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites, such as whether a user can have multiple wallets, or when to choose this over 'process_command' for wallet-related tasks. The description only states the action without context.

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/fakepixels/base-mcp-server'

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