Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_all_symbol_groups

Retrieve all stock symbol groups from Vietnam's market to organize and analyze securities by category, supporting JSON or DataFrame output formats.

Instructions

Get all symbol groups from stock market Args: output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_formatNojson

Implementation Reference

  • The handler function for the 'get_all_symbol_groups' MCP tool. It is registered via the @server.tool() decorator. Returns a hardcoded DataFrame listing all symbol groups (HOSE, HNX, etc.) as JSON or DataFrame based on output_format.
    @server.tool() def get_all_symbol_groups(output_format: Literal["json", "dataframe"] = "json"): """ Get all symbol groups from stock market Args: output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ df = pd.DataFrame( [ {"group": "HOSE", "group_name": "All symbols in HOSE"}, {"group": "HNX", "group_name": "All symbols in HNX"}, {"group": "UPCOM", "group_name": "All symbols in UPCOM"}, {"group": "VN30", "group_name": "All symbols in VN30"}, {"group": "VN100", "group_name": "All symbols in VN100"}, {"group": "HNX30", "group_name": "All symbols in HNX30"}, {"group": "VNMidCap", "group_name": "All symbols in VNMidCap"}, {"group": "VNSmallCap", "group_name": "All symbols in VNSmallCap"}, {"group": "VNAllShare", "group_name": "All symbols in VNAllShare"}, {"group": "HNXCon", "group_name": "All symbols in HNXCon"}, {"group": "HNXFin", "group_name": "All symbols in HNXFin"}, {"group": "HNXLCap", "group_name": "All symbols in HNXLCap"}, {"group": "HNXMSCap", "group_name": "All symbols in HNXMSCap"}, {"group": "HNXMan", "group_name": "All symbols in HNXMan"}, {"group": "ETF", "group_name": "All symbols in ETF"}, {"group": "FU_INDEX", "group_name": "All symbols in FU_INDEX"}, {"group": "CW", "group_name": "All symbols in CW"}, ] ) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
  • Registration of the get_all_symbol_groups tool using FastMCP's @server.tool() decorator.
    @server.tool()
  • Input schema defined in function signature: output_format parameter with Literal type.
    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