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
| Name | Required | Description | Default |
|---|---|---|---|
| walletIds | Yes | Array of wallet IDs to fetch (max 10) |
Implementation Reference
- src/tools/list-wallets.ts:21-60 (handler)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), }, ], }; } - src/tools/list-wallets.ts:4-19 (schema)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'], }, };