Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

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.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
output_formatNojson

Implementation Reference

  • 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

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