list_sips
View all active Systematic Investment Plans (SIPs) with fund names, investment amounts, and upcoming payment dates for managing mutual fund investments on Groww.
Instructions
All active SIPs with fund name, amount, next date
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/sip.ts:20-45 (handler)The handler function for 'list_sips' tool, which fetches SIPs from the client and formats the response.
async () => { try { const sips = await growwClient.listSIPs(); if (sips.length === 0) return mcpText("📭 No SIPs found. Create one to start systematic investing."); const lines = sips.map((s) => { const statusIcon = s.status === "ACTIVE" ? "🟢" : s.status === "PAUSED" ? "🟡" : "🔴"; const pnl = s.currentValue - s.totalInvested; const pnlPct = s.totalInvested > 0 ? (pnl / s.totalInvested) * 100 : 0; return [ `${statusIcon} ${s.fundName}`, ` SIP ID: ${s.sipId} | Status: ${s.status}`, ` Amount: ${formatCurrencyExact(s.amount)} / ${s.frequency}`, ` Instalments: ${s.instalments} | Next: ${s.nextDate}`, ` Invested: ${formatCurrency(s.totalInvested)} | Current: ${formatCurrency(s.currentValue)}`, ` Returns: ${pnlSign(pnl)} (${formatPercent(pnlPct)})`, ].join("\n"); }); const header = `📅 YOUR SIPs (${sips.length})\n${"─".repeat(55)}`; return mcpText([header, ...lines, `\nAs of ${nowIST()}`].join("\n\n")); } catch (err) { return mcpError(normalizeError(err)); } } - src/tools/sip.ts:16-46 (registration)Registration of the 'list_sips' tool using server.tool.
server.tool( "list_sips", "All active SIPs with fund name, amount, next date", {}, async () => { try { const sips = await growwClient.listSIPs(); if (sips.length === 0) return mcpText("📭 No SIPs found. Create one to start systematic investing."); const lines = sips.map((s) => { const statusIcon = s.status === "ACTIVE" ? "🟢" : s.status === "PAUSED" ? "🟡" : "🔴"; const pnl = s.currentValue - s.totalInvested; const pnlPct = s.totalInvested > 0 ? (pnl / s.totalInvested) * 100 : 0; return [ `${statusIcon} ${s.fundName}`, ` SIP ID: ${s.sipId} | Status: ${s.status}`, ` Amount: ${formatCurrencyExact(s.amount)} / ${s.frequency}`, ` Instalments: ${s.instalments} | Next: ${s.nextDate}`, ` Invested: ${formatCurrency(s.totalInvested)} | Current: ${formatCurrency(s.currentValue)}`, ` Returns: ${pnlSign(pnl)} (${formatPercent(pnlPct)})`, ].join("\n"); }); const header = `📅 YOUR SIPs (${sips.length})\n${"─".repeat(55)}`; return mcpText([header, ...lines, `\nAs of ${nowIST()}`].join("\n\n")); } catch (err) { return mcpError(normalizeError(err)); } } );