get_company_officers
Retrieve officer information for Vietnam-listed companies, including current, resigned, or all personnel, with output in JSON or DataFrame 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.DataFrame
Input 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 for the 'get_company_officers' tool. It fetches company officers using vnstock's TCBSCompany class and returns data in JSON or DataFrame format. The @server.tool() decorator also serves as the registration with the FastMCP server.@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