Skip to main content
Glama
darved2305

groww-mcp

by darved2305

get_portfolio_summary

Retrieve a summary of your investment portfolio showing total invested amount, current value, profit/loss, and daily performance.

Instructions

Total invested, current value, total P&L, day's P&L

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool registration and handler implementation for "get_portfolio_summary". It calls growwClient.getPortfolioSummary() and formats the output.
    // ── get_portfolio_summary ─────────────────────────────────
    server.tool(
      "get_portfolio_summary",
      "Total invested, current value, total P&L, day's P&L",
      {},
      async () => {
        try {
          const s = await growwClient.getPortfolioSummary();
          const text = [
            `💼 PORTFOLIO SUMMARY`,
            `${"─".repeat(40)}`,
            `Invested:      ${formatCurrency(s.totalInvested)}`,
            `Current Value:  ${formatCurrency(s.currentValue)}`,
            `Total P&L:     ${pnlSign(s.totalPnl)} (${formatPercent(s.totalPnlPercent)})`,
            `Day's P&L:     ${pnlSign(s.dayPnl)} (${formatPercent(s.dayPnlPercent)})`,
            `Holdings:      ${s.holdingsCount} stocks`,
            ``,
            `As of ${nowIST()}`,
          ].join("\n");
          return mcpText(text);
        } 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