get_fund_asset_holding
Retrieve detailed asset holdings for a specific fund in the Vietnam stock market. Input a fund symbol to get its investment portfolio composition in JSON or dataframe format.
Instructions
Get asset holding of a fund from stock market
Args:
symbol: str (symbol of the fund to get asset holding)
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:598-616 (handler)The handler function decorated with @server.tool(), implementing and registering the get_fund_asset_holding MCP tool. It retrieves asset holdings for a given fund symbol using vnstock's FMarketFund and supports JSON or DataFrame output.@server.tool() def get_fund_asset_holding( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get asset holding of a fund from stock market Args: symbol: str (symbol of the fund to get asset holding) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ fund = FMarketFund() df = fund.details.asset_holding(symbol=symbol) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df