get_fund_details
Retrieve mutual fund details including NAV, AUM, expense ratio, returns, and risk grade using the fund's ISIN code to analyze investment performance.
Instructions
NAV, AUM, expense ratio, returns (1y/3y/5y), risk grade for a mutual fund
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| isin | Yes | Mutual fund ISIN code, e.g. INF846K01EW2 |
Implementation Reference
- src/tools/funds.ts:48-98 (handler)The 'get_fund_details' tool is registered here and includes the handler logic that fetches fund details using 'growwClient.getFundDetails(isin)' and formats the output.
server.tool( "get_fund_details", "NAV, AUM, expense ratio, returns (1y/3y/5y), risk grade for a mutual fund", { isin: z.string().describe("Mutual fund ISIN code, e.g. INF846K01EW2"), }, async ({ isin }) => { try { const f = await growwClient.getFundDetails(isin); const stars = "⭐".repeat(Math.min(f.rating, 5)); const riskLabel: Record<string, string> = { LOW: "🟢 Low", MODERATELY_LOW: "🟢 Moderately Low", MODERATE: "🟡 Moderate", MODERATELY_HIGH: "🟠 Moderately High", HIGH: "🔴 High", }; const text = [ `📈 ${f.name}`, `${"─".repeat(55)}`, `AMC: ${f.amc}`, `Category: ${f.category} > ${f.subCategory}`, `ISIN: ${f.isin}`, `Rating: ${stars}`, ``, `💰 KEY METRICS`, `NAV: ${formatCurrencyExact(f.nav)}`, `AUM: ${formatCurrency(f.aum)}`, `Expense Ratio: ${f.expenseRatio}%`, `Risk: ${riskLabel[f.riskGrade] || f.riskGrade}`, ``, `📊 RETURNS`, `1 Year: ${formatPercent(f.returns1y)}`, `3 Year: ${formatPercent(f.returns3y)}`, `5 Year: ${formatPercent(f.returns5y)}`, ``, `💳 INVESTMENT`, `Min Lumpsum: ${formatCurrencyExact(f.minInvestment)}`, `Min SIP: ${formatCurrencyExact(f.minSIPAmount)}`, `Exit Load: ${f.exitLoad}`, ``, `As of ${nowIST()}`, ].join("\n"); return mcpText(text); } catch (err) { return mcpError(normalizeError(err)); } } );