@baruchiro/actual-mcp
Version:
Actual Budget MCP server exposing API functionality
26 lines • 851 B
JavaScript
// ----------------------------
// GET RULES TOOL
// ----------------------------
import { successWithJson, errorFromCatch } from '../../../utils/response.js';
// import type { Rule } from '../../../types.js';
import { fetchAllRules } from '../../../core/data/fetch-rules.js';
export const schema = {
name: 'get-rules',
description: 'Retrieve a list of all rules. PS amount comes in cents: positive for deposit, negative for payment',
inputSchema: {
type: 'object',
description: 'This tool does not accept any arguments.',
properties: {},
additionalProperties: false,
},
};
export async function handler() {
try {
const rules = await fetchAllRules();
return successWithJson(rules);
}
catch (err) {
return errorFromCatch(err);
}
}
//# sourceMappingURL=index.js.map