list_all_funds
Retrieve comprehensive lists of Vietnam stock market funds by type (balanced, bond, or stock) with flexible output formats for analysis.
Instructions
List all funds from stock market
Args:
fund_type: Literal['BALANCED', 'BOND', 'STOCK', None ] = None (if None, return funds in all types)
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fund_type | No | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:499-517 (handler)The handler function for the 'list_all_funds' tool. It is decorated with @server.tool() for registration in the FastMCP server. It uses FMarketFund from vnstock to list funds by type and returns the result as JSON or DataFrame.@server.tool() def list_all_funds( fund_type: Literal["BALANCED", "BOND", "STOCK", None] = None, output_format: Literal["json", "dataframe"] = "json", ): # pyright: ignore[reportUndefinedVariable] """ List all funds from stock market Args: fund_type: Literal['BALANCED', 'BOND', 'STOCK', None ] = None (if None, return funds in all types) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ fund = FMarketFund() df = fund.listing(fund_type=fund_type) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df