Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_company_events

Retrieve corporate events for Vietnam-listed companies using stock symbols, with pagination and output format options.

Instructions

Get company events from stock market
Args:
    symbol: str
    page_size: int = 10
    page: int = 0
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
page_sizeNo
pageNo
output_formatNojson

Implementation Reference

  • The handler function for the 'get_company_events' tool. It is registered via the @server.tool() decorator, with input schema defined by type hints and docstring. Executes by fetching events from TCBSCompany.events() and returns as JSON or DataFrame.
    @server.tool()
    def get_company_events(
        symbol: str,
        page_size: int = 10,
        page: int = 0,
        output_format: Literal["json", "dataframe"] = "json",
    ):
        """
        Get company events from stock market
        Args:
            symbol: str
            page_size: int = 10
            page: int = 0
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        equity = TCBSCompany(symbol=symbol)
        df = equity.events(page_size=page_size, page=page)
        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