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)}`,
              },
            ],
          };
        }
      }
    );
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 the action ('List all available wallets') but lacks details on permissions, rate limits, return format, or pagination, which are critical for a read operation.

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 no wasted words. It's appropriately sized for a simple tool and front-loads the key information, making it easy to parse quickly.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'wallets' are in this context, the return format, or any behavioral traits, leaving gaps in understanding for an AI agent.

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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents the inputs. The description doesn't need to add parameter details, and it doesn't introduce confusion, earning a baseline score of 4 for zero-parameter tools.

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 clearly states the verb ('List') and resource ('all available wallets'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_current_wallet' or 'import_wallet', which prevents a perfect score.

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 about when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or comparisons to sibling tools like 'get_current_wallet' or 'import_wallet', leaving usage ambiguous.

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