UNPKG

@baruchiro/actual-mcp

Version:

Actual Budget MCP server exposing API functionality

23 lines 962 B
// Parses and validates input arguments for spending-by-category tool export class SpendingByCategoryInputParser { parse(args) { if (!args || typeof args !== 'object') { throw new Error('Arguments must be an object'); } const argsObj = args; const { startDate, endDate, accountId, includeIncome } = argsObj; if (!startDate || typeof startDate !== 'string') { throw new Error('startDate is required and must be a string (YYYY-MM-DD)'); } if (!endDate || typeof endDate !== 'string') { throw new Error('endDate is required and must be a string (YYYY-MM-DD)'); } return { startDate, endDate, accountId: accountId && typeof accountId === 'string' ? accountId : undefined, includeIncome: typeof includeIncome === 'boolean' ? includeIncome : false, }; } } //# sourceMappingURL=input-parser.js.map