actual-mcp
Version:
Actual Budget MCP server exposing API functionality
18 lines • 639 B
JavaScript
// Parses and validates input arguments for balance-history tool
export class BalanceHistoryInputParser {
parse(args) {
if (!args || typeof args !== 'object') {
throw new Error('Arguments must be an object');
}
const argsObj = args;
const { accountId, months } = argsObj;
if (!accountId || typeof accountId !== 'string') {
throw new Error('accountId is required and must be a string');
}
return {
accountId,
months: typeof months === 'number' && months > 0 ? months : 12,
};
}
}
//# sourceMappingURL=input-parser.js.map