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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/portfolio.ts:44-68 (handler)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)); } } );