Skip to main content
Glama
ferdhika31

Money Lover MCP Server

get_transactions

Fetch wallet transactions within a specified date range to track spending, monitor income, and analyze financial activity over time.

Instructions

Fetch transactions for a wallet between two dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoJWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables
walletIdYesWallet identifier
startDateYesStart date in YYYY-MM-DD format
endDateYesEnd date in YYYY-MM-DD format

Implementation Reference

  • MCP tool handler function that executes the get_transactions logic: resolves token, invokes MoneyloverClient.getTransactions, and returns formatted success or error response.
    async ({ token, walletId, startDate, endDate }) => { try { const data = await runWithClient(token, client => client.getTransactions(walletId, startDate, endDate)); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } }
  • Input schema definition for the get_transactions tool, specifying parameters: token (optional), walletId, startDate, and endDate with validation.
    inputSchema: { ...tokenArgument, walletId: z.string().min(1).describe('Wallet identifier'), startDate: z .string() .regex(/\d{4}-\d{2}-\d{2}/) .describe('Start date in YYYY-MM-DD format'), endDate: z .string() .regex(/\d{4}-\d{2}-\d{2}/) .describe('End date in YYYY-MM-DD format') }
  • src/server.js:383-409 (registration)
    Registration of the 'get_transactions' MCP tool on the server, providing title, description, input schema, and handler function.
    server.registerTool( 'get_transactions', { title: 'Get Transactions', description: 'Fetch transactions for a wallet between two dates.', inputSchema: { ...tokenArgument, walletId: z.string().min(1).describe('Wallet identifier'), startDate: z .string() .regex(/\d{4}-\d{2}-\d{2}/) .describe('Start date in YYYY-MM-DD format'), endDate: z .string() .regex(/\d{4}-\d{2}-\d{2}/) .describe('End date in YYYY-MM-DD format') } }, async ({ token, walletId, startDate, endDate }) => { try { const data = await runWithClient(token, client => client.getTransactions(walletId, startDate, endDate)); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } } );
  • MoneyloverClient helper method that performs the actual API POST request to /transaction/list with walletId, startDate, and endDate.
    async getTransactions(walletId, startDate, endDate) { const payload = { walletId: ensureString(walletId, 'walletId'), startDate: ensureString(startDate, 'startDate'), endDate: ensureString(endDate, 'endDate') }; return this.#post('/transaction/list', { body: JSON.stringify(payload), headers: { 'Content-Type': 'application/json' } }); }

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