Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_price_board

Retrieve current price board data for specified Vietnam stock symbols, returning results in JSON or DataFrame format for market analysis.

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 handler function for the 'get_price_board' tool. It is registered via the @server.tool() decorator in FastMCP. Fetches price board data for given symbols using VCITrading and returns as JSON or pandas 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()
  • Docstring and type hints define the input schema (symbols: list[str], output_format: Literal["json", "dataframe"]) and output (pd.DataFrame or JSON). FastMCP uses this for tool schema.
    """
    Get price board from stock market
    Args:
        symbols: list[str] (list of symbols to get price board)
        output_format: Literal['json', 'dataframe'] = 'json'
    Returns:

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