get_raw_report
Retrieve company financial reports from Vietnam's stock market by specifying a stock symbol, reporting period, and preferred output format.
Instructions
Get raw report of a company from stock market
Args:
symbol: str (symbol of the company to get raw report)
period: Literal['quarter', 'year'] = 'year' (period to get raw report)
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| period | No | year | |
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:473-493 (handler)The main handler function for the 'get_raw_report' tool. It is registered via @server.tool() decorator. Fetches raw financial reports using VCIFinance from vnstock library and returns as JSON or DataFrame.@server.tool() def get_raw_report( symbol: str, period: Literal["quarter", "year"] = "year", output_format: Literal["json", "dataframe"] = "json", ): # pyright: ignore[reportUndefinedVariable] """ Get raw report of a company from stock market Args: symbol: str (symbol of the company to get raw report) period: Literal['quarter', 'year'] = 'year' (period to get raw report) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ finance = VCIFinance(symbol=symbol, period=period) df = finance._get_report(mode="raw") if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df