get_company_overview
Retrieve company overview data from Vietnam's stock market by providing a stock symbol, with output available in JSON or dataframe format.
Instructions
Get company overview from stock market
Args:
symbol: str
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrameInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:23-40 (handler)The main handler function for the 'get_company_overview' MCP tool. It is decorated with @server.tool() for registration. Fetches company overview data using TCBSCompany from vnstock and returns it as JSON or pandas DataFrame based on the output_format parameter.
@server.tool() def get_company_overview( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get company overview from stock market Args: symbol: str output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ equity = TCBSCompany(symbol=symbol) df = equity.overview() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df - src/vnstock_mcp/server.py:23-23 (registration)The @server.tool() decorator registers the get_company_overview function as an MCP tool with the FastMCP server.
@server.tool() - src/vnstock_mcp/server.py:24-34 (schema)Input schema defined by function parameters with type hints (symbol: str, output_format: Literal["json", "dataframe"] = "json") and docstring describing args and return type.
def get_company_overview( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get company overview from stock market Args: symbol: str output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """