Skip to main content
Glama
cuongpo

Rootstock MCP Server

by cuongpo

list_wallets

Retrieve a list of all available wallets managed by the Rootstock MCP Server for querying, transacting, and managing assets on the Rootstock blockchain.

Instructions

List all available wallets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for 'list_wallets'. Retrieves wallets from WalletManager, formats a list indicating the current wallet, and returns as text content.
    private async handleListWallets() {
      const wallets = this.walletManager.listWallets();
      const currentAddress = this.walletManager.getCurrentAddress();
    
      let response = `Available Wallets (${wallets.length}):\n\n`;
    
      for (const wallet of wallets) {
        const isCurrent = wallet.address.toLowerCase() === currentAddress.toLowerCase();
        response += `${isCurrent ? '→ ' : '  '}${wallet.address}${isCurrent ? ' (current)' : ''}\n`;
      }
    
      return {
        content: [
          {
            type: 'text',
            text: response,
          },
        ],
      };
    }
  • src/index.ts:199-206 (registration)
    Tool registration in getAvailableTools(), including name, description, and empty input schema (no parameters required). Used by ListToolsRequestSchema handler.
    {
      name: 'list_wallets',
      description: 'List all available wallets',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema definition for 'list_wallets' tool: empty object since the tool takes no parameters.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Core helper method in WalletManager that lists all stored wallets as WalletInfo[] (addresses and public keys only, no private keys).
    listWallets(): WalletInfo[] {
      const walletList: WalletInfo[] = [];
      
      for (const [_address, wallet] of this.wallets) {
        walletList.push({
          address: wallet.address,
          publicKey: 'publicKey' in wallet ? (wallet as any).publicKey : undefined,
          // Don't expose private keys in list
        });
      }
    
      return walletList;
    }
  • Alternative handler implementation for 'list_wallets' tool in the Smithery-specific MCP server, using direct server.tool() registration with Zod schema (empty).
    server.tool(
      "list_wallets",
      "List all available wallets",
      {},
      async () => {
        try {
          // This tool doesn't require authentication - it can list empty wallets
          const wallets = walletManager.listWallets();
          const currentAddress = walletManager.getCurrentAddress();
    
          let response = `Available Wallets (${wallets.length}):\n\n`;
    
          for (const wallet of wallets) {
            const isCurrent = wallet.address.toLowerCase() === currentAddress.toLowerCase();
            response += `${isCurrent ? '→ ' : '  '}${wallet.address}${isCurrent ? ' (current)' : ''}\n`;
          }
    
          return {
            content: [
              {
                type: "text",
                text: response,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error listing wallets: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
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. 'List all available wallets' implies a read-only operation that returns wallet identifiers or metadata, but it doesn't specify critical behaviors: whether it requires authentication, returns paginated results, includes deleted/inactive wallets, or has rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves in practice.

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 ('List all available wallets') that front-loads the core action and resource. It wastes no words on redundancy or fluff, making it easy to parse quickly. Every word earns its place by directly contributing to understanding the tool's function.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context about the return format (e.g., list of wallet names, IDs, or full objects), error conditions, or integration with sibling tools. For a basic list operation, this might suffice, but it doesn't provide enough detail for confident use in complex scenarios.

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 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline of 4 is given because the schema fully documents the lack of parameters, and the description doesn't need to compensate—it correctly focuses on the tool's purpose rather than unnecessary parameter explanations.

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

Purpose4/5

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

The description 'List all available wallets' clearly states the verb ('List') and resource ('wallets'), making the purpose immediately understandable. It distinguishes from siblings like 'create_wallet' (creation vs listing) and 'check_balance' (listing vs querying specific data), though it doesn't explicitly differentiate from 'process_command' which is more ambiguous. The description is specific enough to understand the tool's function without being tautological.

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 alternatives. It doesn't mention prerequisites (e.g., whether wallets must exist), compare it to siblings like 'check_balance' (which might list balances rather than wallets), or specify scenarios where listing is appropriate (e.g., before selecting a wallet for another operation). The agent must infer usage from the tool name and context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.