Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_income_statements

Retrieve company income statements from Vietnam's stock market to analyze financial performance by specifying stock symbol, period, and output format.

Instructions

Get income statements of a company from stock market Args: symbol: str (symbol of the company to get income statements) period: Literal['quarter', 'year'] = 'year' (period to get income statements) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
periodNoyear
output_formatNojson

Implementation Reference

  • The main handler function for the 'get_income_statements' tool, registered via @server.tool() decorator. It retrieves income statements for a given stock symbol and period using the VCIFinance class from vnstock library, supporting both JSON and DataFrame output formats.
    @server.tool() def get_income_statements( symbol: str, period: Literal["quarter", "year"] = "year", output_format: Literal["json", "dataframe"] = "json", ): """ Get income statements of a company from stock market Args: symbol: str (symbol of the company to get income statements) period: Literal['quarter', 'year'] = 'year' (period to get income statements) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ finance = VCIFinance(symbol=symbol, period=period) df = finance.income_statement() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: 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