Skip to main content
Glama
lordbasilaiassistant-sudo

base-multi-wallet-mcp

list_wallets

View all managed wallets with ETH balances and optional token balances for coordinated multi-wallet trading on Base.

Instructions

List all managed wallets with ETH balances and optional token balances.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_addressNoToken contract address to check balances for (optional)

Implementation Reference

  • The handler function that implements the logic for 'list_wallets', which fetches ETH and optional token balances for all managed wallets.
    async function handleListWallets(
      args: z.infer<typeof ListWalletsSchema>
    ): Promise<string> {
      if (wallets.length === 0) {
        return JSON.stringify({
          wallets: [],
          message: "No managed wallets. Use create_wallet or import_wallet first.",
        });
      }
    
      const provider = getProvider();
      const results: Array<{
        address: string;
        label: string;
        eth_balance: string;
        token_balance?: string;
        token_symbol?: string;
      }> = [];
    
      let tokenInfo: { symbol: string; decimals: number } | null = null;
      if (args.token_address) {
        tokenInfo = await getTokenInfo(provider, args.token_address);
      }
    
      const balancePromises = wallets.map(async (w) => {
        const ethBal = await provider.getBalance(w.address);
        let tokenBal: bigint | undefined;
        if (args.token_address) {
          tokenBal = await getTokenBalance(provider, args.token_address, w.address);
        }
        return { wallet: w, ethBal, tokenBal };
      });
    
      const settled = await Promise.allSettled(balancePromises);
    
      for (const result of settled) {
        if (result.status === "fulfilled") {
          const { wallet, ethBal, tokenBal } = result.value;
          const entry: (typeof results)[0] = {
            address: wallet.address,
            label: wallet.label,
            eth_balance: formatEth(ethBal),
          };
          if (tokenBal !== undefined && tokenInfo) {
            entry.token_balance = ethers.formatUnits(tokenBal, tokenInfo.decimals);
            entry.token_symbol = tokenInfo.symbol;
          }
          results.push(entry);
        }
      }
    
      return JSON.stringify({ wallets: results, total: results.length }, null, 2);
    }
  • Input schema for 'list_wallets'.
    const ListWalletsSchema = z.object({
      token_address: z
        .string()
        .optional()
        .describe("Token contract address to check balances for (optional)"),
    });
  • src/index.ts:795-807 (registration)
    Registration of the 'list_wallets' tool in the MCP server.
      name: "list_wallets",
      description:
        "List all managed wallets with ETH balances and optional token balances.",
      inputSchema: {
        type: "object" as const,
        properties: {
          token_address: {
            type: "string",
            description: "Token contract address to check balances for (optional)",
          },
        },
      },
    },
Behavior3/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 adds valuable context about what data is returned (ETH balances and optional token balances), but fails to indicate read-only safety, return data structure, pagination behavior for 'all' wallets, or whether this queries a local cache versus the blockchain.

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, front-loaded sentence of nine words. Every element earns its place: the action (List), scope (all managed wallets), default return data (ETH balances), and conditional behavior (optional token balances). No redundancy or fluff.

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 lack of output schema and annotations, the description should ideally specify the return structure (e.g., 'returns array of wallet objects'). It partially compensates by describing the content (balances) but omits the container format, making it minimally adequate for this simple, single-parameter tool.

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 token_address parameter already well-documented in the schema as 'Token contract address to check balances for (optional)'. The description reinforces this with 'optional token balances' but adds no additional semantic detail beyond the schema, warranting the baseline score.

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 uses a specific verb ('List') and clear resource ('managed wallets'), distinguishing it from sibling tools like create_wallet, fund_wallets, and import_wallet which perform mutations or imports. It specifies scope ('all') and key data returned (ETH/token balances), though 'managed' could be slightly more explicit.

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 lacks explicit guidance on when to use this tool versus alternatives (e.g., when to list all wallets versus using import_wallet or create_wallet). While it mentions 'optional token balances,' this describes parameter behavior rather than providing usage context or prerequisites.

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

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/lordbasilaiassistant-sudo/base-multi-wallet-mcp'

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