get_company_reports
Retrieve company financial reports from Vietnam's stock market. Specify a stock symbol to access structured financial data in JSON or DataFrame format.
Instructions
Get company reports from stock market
Args:
symbol: str
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:159-177 (handler)The handler function for the 'get_company_reports' tool, decorated with @server.tool() which registers it in the MCP server. It retrieves company reports using VCICompany.reports() and returns the data as JSON or DataFrame based on the output_format parameter.@server.tool() def get_company_reports( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get company reports from stock market Args: symbol: str output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ equity = VCICompany(symbol=symbol) df = equity.reports() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df