paisa-mcp 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -42581,12 +42581,16 @@ function registerGoalTools(server, client) {
42581
42581
  inputSchema: {
42582
42582
  type: exports_external.enum(["goal", "emi", "sinking_fund"]),
42583
42583
  id: exports_external.string().optional().describe("[goal] Goal UUID — omit to create, pass to update"),
42584
+ goalType: exports_external.enum(["emergency_fund", "travel", "car", "house", "education", "retirement", "custom"]).optional().describe("[goal] Goal category — required when creating"),
42584
42585
  name: exports_external.string().optional().describe("[goal, emi, sinking_fund] Name"),
42585
42586
  targetAmount: exports_external.string().optional().describe("[goal, sinking_fund] Target amount"),
42586
42587
  targetDate: exports_external.string().optional().describe("[goal, sinking_fund] YYYY-MM-DD"),
42587
42588
  currentAmount: exports_external.string().optional().describe("[goal, sinking_fund] Already saved"),
42589
+ monthlyContribution: exports_external.string().optional().describe("[goal] Monthly contribution"),
42590
+ owner: exports_external.string().optional().describe("[goal, emi] Owner"),
42588
42591
  icon: exports_external.string().optional().describe("[goal] Icon"),
42589
42592
  color: exports_external.string().optional().describe("[goal] Color"),
42593
+ notes: exports_external.string().optional().describe("[goal] Notes"),
42590
42594
  totalAmount: exports_external.string().optional().describe("[emi] Total loan amount"),
42591
42595
  emiAmount: exports_external.string().optional().describe("[emi] Monthly EMI amount"),
42592
42596
  interestRate: exports_external.string().optional().describe("[emi] Interest rate (optional)"),
@@ -42594,7 +42598,6 @@ function registerGoalTools(server, client) {
42594
42598
  endDate: exports_external.string().optional().describe("[emi] YYYY-MM-DD last payment date"),
42595
42599
  totalMonths: exports_external.number().optional().describe("[emi] Tenure in months"),
42596
42600
  paidMonths: exports_external.number().optional().describe("[emi] Months already paid"),
42597
- owner: exports_external.string().optional().describe("[emi] Owner"),
42598
42601
  monthlyContribution: exports_external.string().optional().describe("[sinking_fund] Monthly contribution (optional)")
42599
42602
  }
42600
42603
  }, async ({ type, ...fields }) => {
@@ -42605,10 +42608,10 @@ function registerGoalTools(server, client) {
42605
42608
  }
42606
42609
  };
42607
42610
  if (type === "goal") {
42608
- const { id, name: name2, targetAmount: targetAmount2, targetDate: targetDate2, currentAmount: currentAmount2, icon, color } = fields;
42609
- const body2 = { name: name2, targetAmount: targetAmount2, targetDate: targetDate2, currentAmount: currentAmount2, icon, color };
42611
+ const { id, goalType, name: name2, targetAmount: targetAmount2, targetDate: targetDate2, currentAmount: currentAmount2, monthlyContribution: monthlyContribution2, owner, icon, color, notes } = fields;
42612
+ const body2 = { type: goalType, name: name2, targetAmount: targetAmount2, targetDate: targetDate2, currentAmount: currentAmount2, monthlyContribution: monthlyContribution2, owner, icon, color, notes };
42610
42613
  if (!id)
42611
- require2(["name", "targetAmount"]);
42614
+ require2(["name", "targetAmount", "goalType"]);
42612
42615
  const data2 = id ? await client.patch(`/api/goals/${id}`, body2) : await client.post("/api/goals", body2);
42613
42616
  return { content: [{ type: "text", text: JSON.stringify(data2) }] };
42614
42617
  }
@@ -42635,6 +42638,28 @@ function registerGoalTools(server, client) {
42635
42638
  const data = await client.post("/api/goals/sinking-funds", body);
42636
42639
  return { content: [{ type: "text", text: JSON.stringify(data) }] };
42637
42640
  });
42641
+ server.registerTool("upsert_insurance", {
42642
+ description: "Create or update an insurance policy. Omit id to create (name, type, provider, premiumAmount, premiumFrequency, startDate, owner required). Pass id to update.",
42643
+ inputSchema: {
42644
+ id: exports_external.string().optional().describe("Policy UUID — omit to create, pass to update"),
42645
+ name: exports_external.string().optional(),
42646
+ type: exports_external.enum(["term", "health", "vehicle", "home", "other"]).optional(),
42647
+ provider: exports_external.string().optional(),
42648
+ coverAmount: exports_external.string().optional(),
42649
+ premiumAmount: exports_external.string().optional(),
42650
+ premiumFrequency: exports_external.string().optional().describe('e.g. "yearly", "monthly"'),
42651
+ startDate: exports_external.string().optional().describe("YYYY-MM-DD"),
42652
+ endDate: exports_external.string().optional().describe("YYYY-MM-DD"),
42653
+ renewalDate: exports_external.string().optional().describe("YYYY-MM-DD"),
42654
+ policyNumber: exports_external.string().optional(),
42655
+ owner: exports_external.string().optional(),
42656
+ isActive: exports_external.boolean().optional(),
42657
+ notes: exports_external.string().optional()
42658
+ }
42659
+ }, async ({ id, ...body }) => {
42660
+ const data = id ? await client.patch(`/api/goals/insurance/${id}`, body) : await client.post("/api/goals/insurance", body);
42661
+ return { content: [{ type: "text", text: JSON.stringify(data) }] };
42662
+ });
42638
42663
  server.registerTool("contribute_to_goal", {
42639
42664
  description: "Add a contribution to a savings goal.",
42640
42665
  inputSchema: {
@@ -45311,5 +45336,5 @@ main().catch((err) => {
45311
45336
  process.exit(1);
45312
45337
  });
45313
45338
 
45314
- //# debugId=671EA523E40384C364756E2164756E21
45339
+ //# debugId=8AA3117ABFC4C20064756E2164756E21
45315
45340
  //# sourceMappingURL=index.js.map