get_company_officers
Retrieve company officer information from Vietnam's stock market. Filter by current, resigned, or all officers and choose JSON or dataframe output format.
Instructions
Get company officers from stock market
Args:
symbol: str
filter_by: Literal['working', "all", 'resigned'] = 'working'
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrameInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| filter_by | No | working | |
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:113-133 (handler)The handler function implementing the 'get_company_officers' tool. It uses TCBSCompany from vnstock to fetch officers data filtered by status and returns as JSON or DataFrame. Registered via @server.tool() decorator with FastMCP.
@server.tool() def get_company_officers( symbol: str, filter_by: Literal["working", "all", "resigned"] = "working", output_format: Literal["json", "dataframe"] = "json", ): # pyright: ignore[reportUndefinedVariable] # noqa: E501 """ Get company officers from stock market Args: symbol: str filter_by: Literal['working', "all", 'resigned'] = 'working' output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ equity = TCBSCompany(symbol=symbol) df = equity.officers(filter_by=filter_by) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df