Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_company_news

Retrieve company news from Vietnam's stock market by providing a stock symbol, with options to paginate results and choose output format.

Instructions

Get company news 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 implementing the 'get_company_news' tool. It is registered via the @server.tool() decorator. Fetches news data for a given company symbol using the TCBSCompany class from the vnstock library, supports JSON or DataFrame output.
    @server.tool()
    def get_company_news(
        symbol: str,
        page_size: int = 10,
        page: int = 0,
        output_format: Literal["json", "dataframe"] = "json",
    ):
        """
        Get company news 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.news(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. While it mentions the return type (pd.DataFrame) and output format options, it doesn't describe important behavioral aspects: whether this is a read-only operation, what data sources are used, rate limits, authentication requirements, error conditions, or pagination behavior beyond the page/page_size parameters. For a tool with no annotation coverage, this leaves significant gaps.

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

Conciseness4/5

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

The description is efficiently structured with clear sections (Args, Returns) and uses minimal verbiage. Every sentence serves a purpose: stating the tool's function, documenting parameters, and specifying return type. However, the formatting with quotes and line breaks could be cleaner, and the purpose statement could be more front-loaded.

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

Completeness2/5

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

For a tool with 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. While it documents parameters and return type, it lacks crucial context: what 'company news' includes (headlines, dates, sources?), how results are ordered, error handling, data freshness, or relationship to sibling tools. The agent would struggle to use this tool effectively without trial and error.

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

Parameters3/5

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

The description explicitly lists all 4 parameters with their types and defaults, which adds significant value since schema description coverage is 0%. However, it doesn't explain parameter semantics beyond basic typing: what constitutes a valid 'symbol', what 'page_size' and 'page' actually control (e.g., pagination of news items), or what the output_format choice entails. The parameter documentation is present but lacks contextual meaning.

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 tool's purpose: 'Get company news from stock market' - a specific verb ('Get') and resource ('company news') with domain context ('stock market'). It distinguishes itself from siblings like get_company_overview or get_company_events by focusing specifically on news. However, it doesn't explicitly contrast with these siblings in the description text itself.

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 available (get_company_overview, get_company_events, etc.), there's no indication of what distinguishes news from other company information, when news is preferable to other data sources, or any prerequisites for using this tool.

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