Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_price_board

Retrieve real-time price board data for Vietnam stock market symbols in JSON or dataframe format to monitor current market values.

Instructions

Get price board from stock market Args: symbols: list[str] (list of symbols to get price board) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsYes
output_formatNojson

Implementation Reference

  • The main handler function for the 'get_price_board' tool, decorated with @server.tool() for MCP registration. It uses VCITrading from vnstock to fetch the price board data for given symbols and returns it as JSON or DataFrame.
    @server.tool() def get_price_board( symbols: list[str], output_format: Literal["json", "dataframe"] = "json" ): """ Get price board from stock market Args: symbols: list[str] (list of symbols to get price board) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ trading = VCITrading() df = trading.price_board(symbols_list=symbols) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
  • The @server.tool() decorator registers the get_price_board function as an MCP tool.
    @server.tool()
  • Input schema defined by function parameters with type hints: symbols (list[str]), output_format (Literal["json", "dataframe"]). Output is pd.DataFrame or JSON string. Docstring provides description.
    def get_price_board( symbols: list[str], output_format: Literal["json", "dataframe"] = "json" ): """ Get price board from stock market Args: symbols: list[str] (list of symbols to get price board) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ trading = VCITrading() df = trading.price_board(symbols_list=symbols) 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