Skip to main content
Glama
getpara
by getpara

list_wallets

Fetch multiple Para MPC wallets simultaneously by their IDs to retrieve wallet data across EVM, Solana, and Cosmos blockchains. Handles up to 10 wallet IDs per request.

Instructions

Batch-fetch multiple wallets by their IDs. Para has no native list endpoint, so this fetches each wallet individually via Promise.allSettled. Maximum 10 IDs per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletIdsYesArray of wallet IDs to fetch (max 10)

Implementation Reference

  • The handler function that executes the list_wallets tool logic by fetching multiple wallets via their IDs.
    export async function handler(client: ParaClient, args: Record<string, unknown>) {
      const walletIds = args.walletIds as string[];
    
      if (!Array.isArray(walletIds) || walletIds.length === 0) {
        return {
          content: [{ type: 'text' as const, text: 'Error: walletIds must be a non-empty array.' }],
          isError: true,
        };
      }
    
      if (walletIds.length > 10) {
        return {
          content: [{ type: 'text' as const, text: 'Error: Maximum 10 wallet IDs per call.' }],
          isError: true,
        };
      }
    
      const results = await Promise.allSettled(
        walletIds.map((id) => client.requestWithRetry<Wallet>(`/v1/wallets/${id}`)),
      );
    
      const wallets = results.map((result, i) => {
        if (result.status === 'fulfilled') {
          return { walletId: walletIds[i], ...result.value };
        }
        return {
          walletId: walletIds[i],
          error: result.reason instanceof Error ? result.reason.message : String(result.reason),
        };
      });
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({ wallets }, null, 2),
          },
        ],
      };
    }
  • The schema definition for the list_wallets tool, including input validation.
    export const definition = {
      name: 'list_wallets',
      description:
        'Batch-fetch multiple wallets by their IDs. Para has no native list endpoint, so this fetches each wallet individually via Promise.allSettled. Maximum 10 IDs per call.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          walletIds: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of wallet IDs to fetch (max 10)',
          },
        },
        required: ['walletIds'],
      },
    };

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/getpara/para-wallet-mcp'

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