get_fund_nav_report
Retrieve net asset value (NAV) reports for mutual funds from the Vietnam stock market, supporting JSON or DataFrame output formats.
Instructions
Get nav report of a fund from stock market
Args:
symbol: str (symbol of the fund to get nav report)
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:538-556 (handler)The main handler function for the 'get_fund_nav_report' tool. It is decorated with @server.tool(), which registers it as an MCP tool. The function fetches the NAV report for a given fund symbol using the FMarketFund class from vnstock and returns it in JSON or DataFrame format.@server.tool() def get_fund_nav_report( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get nav report of a fund from stock market Args: symbol: str (symbol of the fund to get nav report) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ fund = FMarketFund() df = fund.details.nav_report(symbol=symbol) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df