UNPKG

@baruchiro/actual-mcp

Version:

Actual Budget MCP server exposing API functionality

22 lines 1.23 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, categoryName, payeeName, uncategorizedOnly, limit } = argsObj; return { accountId: typeof accountId === 'string' && accountId.length > 0 ? accountId : undefined, startDate: typeof startDate === 'string' ? startDate : undefined, endDate: typeof endDate === 'string' ? endDate : undefined, minAmount: typeof minAmount === 'number' ? minAmount : undefined, maxAmount: typeof maxAmount === 'number' ? maxAmount : undefined, categoryName: typeof categoryName === 'string' ? categoryName : undefined, payeeName: typeof payeeName === 'string' ? payeeName : undefined, uncategorizedOnly: typeof uncategorizedOnly === 'boolean' ? uncategorizedOnly : undefined, limit: typeof limit === 'number' ? limit : undefined, }; } } //# sourceMappingURL=input-parser.js.map