UNPKG

actual-mcp

Version:

Actual Budget MCP server exposing API functionality

24 lines 1.14 kB
// Parses and validates input arguments for get-transactions tool export class GetTransactionsInputParser { parse(args) { if (!args || typeof args !== 'object') { throw new Error('Arguments must be an object'); } const argsObj = args; const { accountId, startDate, endDate, minAmount, maxAmount, category, payee, limit } = argsObj; if (!accountId || typeof accountId !== 'string') { throw new Error('accountId is required and must be a string'); } return { accountId, startDate: typeof startDate === 'string' ? startDate : undefined, endDate: typeof endDate === 'string' ? endDate : undefined, minAmount: typeof minAmount === 'number' ? minAmount : undefined, maxAmount: typeof maxAmount === 'number' ? maxAmount : undefined, category: typeof category === 'string' ? category : undefined, payee: typeof payee === 'string' ? payee : undefined, limit: typeof limit === 'number' ? limit : undefined, }; } } //# sourceMappingURL=input-parser.js.map