get_wallets
Retrieve all available wallets for authenticated users to manage personal finances and track expenses across multiple accounts.
Instructions
List all wallets accessible to the authenticated user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | JWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables |
Implementation Reference
- src/server.js:350-357 (handler)The main handler function for the 'get_wallets' tool. It runs the client.getWallets() method via runWithClient and formats the result.async ({ token }) => { try { const wallets = (await runWithClient(token, client => client.getWallets())) ?? []; return formatSuccess({ wallets }); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } }
- src/server.js:342-349 (schema)Schema definition for the 'get_wallets' tool, including input (token) and output (wallets array).{ title: 'Get Wallets', description: 'List all wallets accessible to the authenticated user.', inputSchema: tokenArgument, outputSchema: { wallets: z.array(z.record(z.any())) } },
- src/server.js:340-358 (registration)Registration of the 'get_wallets' tool on the MCP server.server.registerTool( 'get_wallets', { title: 'Get Wallets', description: 'List all wallets accessible to the authenticated user.', inputSchema: tokenArgument, outputSchema: { wallets: z.array(z.record(z.any())) } }, async ({ token }) => { try { const wallets = (await runWithClient(token, client => client.getWallets())) ?? []; return formatSuccess({ wallets }); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } } );
- src/moneyloverClient.js:122-124 (helper)Helper method in MoneyloverClient that performs the API call to fetch wallets.async getWallets() { return this.#post('/wallet/list'); }