get_company_shareholders
Retrieve shareholder information for Vietnamese companies by stock symbol to analyze ownership structures and investment decisions.
Instructions
Get company shareholders 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:93-110 (handler)The handler function implements the get_company_shareholders tool. It creates a TCBSCompany instance, calls its shareholders() method to fetch data, and returns it as JSON or pandas DataFrame based on output_format. The @server.tool() decorator handles both registration and schema inference from type hints.
@server.tool() def get_company_shareholders( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get company shareholders from stock market Args: symbol: str output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ equity = TCBSCompany(symbol=symbol) df = equity.shareholders() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df