Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_company_subsidiaries

Retrieve subsidiary information for Vietnamese companies listed on the stock market. Use this tool to identify corporate relationships and ownership structures by providing a stock symbol.

Instructions

Get company subsidiaries from stock market
Args:
    symbol: str
    filter_by: Literal["all", "subsidiary"] = "all"
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
filter_byNoall
output_formatNojson

Implementation Reference

  • The handler function for the 'get_company_subsidiaries' tool. It uses TCBSCompany to fetch subsidiaries data based on symbol and filter, returning it as JSON or DataFrame. The @server.tool() decorator registers it as an MCP tool.
    @server.tool()
    def get_company_subsidiaries(
        symbol: str,
        filter_by: Literal["all", "subsidiary"] = "all",
        output_format: Literal["json", "dataframe"] = "json",
    ):  # pyright: ignore[reportUndefinedVariable]
        """
        Get company subsidiaries from stock market
        Args:
            symbol: str
            filter_by: Literal["all", "subsidiary"] = "all"
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        equity = TCBSCompany(symbol=symbol)
        df = equity.subsidiaries(filter_by=filter_by)
        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