Skip to main content
Glama
darved2305

groww-mcp

by darved2305

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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));
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/darved2305/groww-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server