Skip to main content
Glama
ferdhika31

Money Lover MCP Server

get_categories

Retrieve expense and income categories for a specific wallet to organize and classify financial transactions within the Money Lover personal finance app.

Instructions

Retrieve categories for a specific wallet.

Input Schema

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

Implementation Reference

  • MCP tool handler for 'get_categories': resolves token via runWithClient and delegates to MoneyloverClient.getCategories(walletId)
    async ({ token, walletId }) => { try { const data = (await runWithClient(token, client => client.getCategories(walletId))) ?? []; return formatSuccess({ categories: data }); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } }
  • Schema definition for get_categories tool: input requires optional token and walletId string; output is {categories: array of objects}
    { title: 'Get Categories', description: 'Retrieve categories for a specific wallet.', inputSchema: { ...tokenArgument, walletId: z.string().min(1).describe('Wallet identifier') }, outputSchema: { categories: z.array(z.record(z.any())) } },
  • src/server.js:360-381 (registration)
    Registration of the 'get_categories' tool on the MCP server
    server.registerTool( 'get_categories', { title: 'Get Categories', description: 'Retrieve categories for a specific wallet.', inputSchema: { ...tokenArgument, walletId: z.string().min(1).describe('Wallet identifier') }, outputSchema: { categories: z.array(z.record(z.any())) } }, async ({ token, walletId }) => { try { const data = (await runWithClient(token, client => client.getCategories(walletId))) ?? []; return formatSuccess({ categories: data }); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } } );
  • Core implementation of getCategories in MoneyloverClient: sends POST form request to /category/list endpoint with walletId
    async getCategories(walletId) { const form = new URLSearchParams(); form.set('walletId', ensureString(walletId, 'walletId')); return this.#post('/category/list', { body: form.toString(), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }); }

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