Skip to main content
Glama
ferdhika31

Money Lover MCP Server

get_wallets

Retrieve all available wallets for authenticated users to manage personal finances and track expenses in Money Lover.

Instructions

List all wallets accessible to the authenticated user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoJWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables

Implementation Reference

  • src/server.js:340-358 (registration)
    Registers the 'get_wallets' tool with the MCP server, providing title, description, input/output schemas, and the handler function.
    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))); } } );
  • The main handler function for the 'get_wallets' tool, which resolves authentication token, invokes the client.getWallets() via runWithClient utility, handles errors, and formats the response.
    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))); } }
  • Schema definition for the 'get_wallets' tool, specifying input (token) and output (wallets array). Uses shared tokenArgument.
    { title: 'Get Wallets', description: 'List all wallets accessible to the authenticated user.', inputSchema: tokenArgument, outputSchema: { wallets: z.array(z.record(z.any())) } },
  • Shared schema definition for the token input argument used across tools including get_wallets.
    const tokenArgument = { token: tokenSchema.describe( 'JWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables' ) };
  • Helper method in MoneyloverClient class that performs the actual API call to fetch wallets by POSTing to '/wallet/list' endpoint.
    async getWallets() { return this.#post('/wallet/list'); }

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/ferdhika31/moneylover-mcp'

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