Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_cash_flows

Retrieve cash flow statements for Vietnamese companies to analyze financial performance over quarterly or annual periods.

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
NameRequiredDescriptionDefault
symbolYes
periodNoyear
output_formatNojson

Implementation Reference

  • The handler function implementing the get_cash_flows tool. It is registered via the @server.tool() decorator. Fetches cash flow statements using vnstock's VCIFinance class and returns the raw DataFrame (note: does not handle 'json' output_format). The type hints define the input schema.
    @server.tool() 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ariesanhthu/mcp-server-vietnam-stock-trading'

If you have feedback or need assistance with the MCP directory API, please join our Discord server