get_cash_flows
Retrieve company cash flow statements from Vietnam's stock market for financial analysis, supporting quarterly or annual periods in JSON or dataframe formats.
Instructions
Get cash flows of a company from stock market
Args:
symbol: str (symbol of the company to get cash flows)
period: Literal['quarter', 'year'] = 'year' (period to get cash flows)
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:431-448 (handler)The handler function decorated with @server.tool(), which serves as both the implementation and registration for the MCP tool 'get_cash_flows'. It fetches cash flow data using VCIFinance.cash_flow() and returns a DataFrame (note: does not respect output_format parameter).def get_cash_flows( symbol: str, period: Literal["quarter", "year"] = "year", output_format: Literal["json", "dataframe"] = "json", ): # pyright: ignore[reportUndefinedVariable] """ Get cash flows of a company from stock market Args: symbol: str (symbol of the company to get cash flows) period: Literal['quarter', 'year'] = 'year' (period to get cash flows) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ finance = VCIFinance(symbol=symbol, period=period) df = finance.cash_flow() return df