Skip to main content
Glama
fakepixels

Base Network MCP Server

by fakepixels

process_command

Execute natural language commands for Base network operations, enabling wallet management, balance checks, and transaction execution through LLM-powered automation.

Instructions

Process a natural language command for Base network operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesNatural language command (e.g., "Send 0.1 ETH to 0x123...")

Implementation Reference

  • The core handler function that implements the logic for the 'process_command' tool. It uses NLP to parse the command and dispatches to blockchain-specific handlers.
    export async function processNaturalLanguageCommand(command: string): Promise<any> {
      try {
        // Parse the command
        const parsedCommand = parseCommand(command);
        console.log(`Parsed command: ${JSON.stringify(parsedCommand)}`);
        
        // Generate human-readable description
        const description = generateCommandDescription(parsedCommand);
        console.log(`Command description: ${description}`);
        
        // Process based on intent
        switch (parsedCommand.intent) {
          case CommandIntent.SEND_TRANSACTION:
            return await handleSendTransaction(parsedCommand.parameters as SendTransactionArgs);
          
          case CommandIntent.CHECK_BALANCE:
            return await handleCheckBalance(parsedCommand.parameters as CheckBalanceArgs);
          
          case CommandIntent.CREATE_WALLET:
            return await handleCreateWallet(parsedCommand.parameters as CreateWalletArgs);
          
          case CommandIntent.UNKNOWN:
          default:
            return {
              success: false,
              message: `I couldn't understand that command. Try something like "Send 0.1 ETH to 0x123..." or "Create a new wallet".`,
              originalCommand: command
            };
        }
      } catch (error) {
        console.error('Error processing command:', error);
        return {
          success: false,
          message: `Error processing command: ${error instanceof Error ? error.message : 'Unknown error'}`,
          originalCommand: command
        };
      }
    }
  • Tool definition including schema for 'process_command' in the MCP ListToolsRequestSchema response.
    name: 'process_command',
    description: 'Process a natural language command for Base network operations',
    inputSchema: {
      type: 'object',
      properties: {
        command: {
          type: 'string',
          description: 'Natural language command (e.g., "Send 0.1 ETH to 0x123...")',
        },
      },
      required: ['command'],
    },
  • Handler case in MCP CallToolRequestSchema that validates input and invokes the core processNaturalLanguageCommand function.
    case 'process_command': {
      if (typeof args.command !== 'string' || !args.command) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Command is required and must be a string'
        );
      }
      
      const result = await toolHandlers.processNaturalLanguageCommand(
        args.command
      );
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Registration of the processNaturalLanguageCommand function within the toolHandlers object imported and used by the MCP server.
    export const toolHandlers = {
      processNaturalLanguageCommand,
      handleSendTransaction,
      handleCheckBalance,
      handleCreateWallet,
      handleListWallets
    };
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 mentions 'process a natural language command' but doesn't specify whether this executes commands (potentially destructive), interprets them for further action, or has other behavioral traits like rate limits, authentication needs, or error handling. The description is too vague about what 'process' actually entails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a tool with one parameter, though it could be more front-loaded with specific details about what 'process' means in this context.

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 processing natural language commands for blockchain operations, the description is insufficient. With no annotations, no output schema, and a vague description, it doesn't provide enough context about what the tool actually does, what operations it supports, or what to expect in return. The agent would struggle to understand when and how to use this tool effectively.

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 the single parameter 'command' clearly documented as 'Natural language command (e.g., "Send 0.1 ETH to 0x123...")'. The description doesn't add any meaningful information beyond what the schema already provides about parameter semantics, so it meets the baseline score of 3 for high schema coverage.

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

Purpose3/5

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

The description states the tool 'Process a natural language command for Base network operations' which provides a general purpose (processing commands) and domain (Base network). However, it's vague about what specific operations it supports and doesn't differentiate from sibling tools like check_balance, create_wallet, or list_wallets. It doesn't specify whether this is for executing commands or interpreting them.

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 no guidance on when to use this tool versus the sibling tools. There's no mention of alternatives, prerequisites, or specific contexts where this tool is appropriate versus check_balance, create_wallet, or list_wallets. The agent must infer usage from the general description alone.

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