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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions pagination (page_size, page) and output format options, which is useful, but lacks critical details like rate limits, authentication needs, error handling, or what constitutes a 'company event' (e.g., earnings, splits, mergers). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with 'Args:' and 'Returns:' sections, making it easy to parse, but it's slightly verbose for its content. The sentence 'Get company events from stock market' is front-loaded, but the parameter details could be more succinct. Overall, it's adequate but not optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description partially covers parameters and hints at pagination and output format, but it's incomplete. It doesn't explain the return value 'pd.DataFrame' in context (e.g., structure, columns) or address potential complexities like error cases. For a tool with 4 parameters and financial data, more context on behavior and outputs would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists all parameters with types and defaults, adding clear semantics beyond the schema (which has 0% description coverage). It explains 'symbol' as a string, 'page_size' and 'page' for pagination, and 'output_format' with allowed values, effectively compensating for the schema's lack of descriptions. However, it doesn't clarify the meaning of 'page=0' (e.g., zero-indexed) or provide examples for 'symbol'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'company events from stock market', which is specific and actionable. However, it doesn't distinguish this tool from sibling tools like 'get_company_news' or 'get_company_reports', which might also retrieve company-related information, leaving some ambiguity about what type of 'events' are being retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools for company data (e.g., get_company_news, get_company_reports), there's no indication of what makes 'events' unique or when to prefer this tool over others, leaving the agent to guess based on the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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