Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_company_news

Retrieve company news from Vietnam's stock market by specifying 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 logic. It uses TCBSCompany to fetch news for a given symbol with pagination and formats output as JSON or DataFrame. The @server.tool() decorator also registers it as an MCP tool.
    @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

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