Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_all_symbols

Retrieve all stock symbols from Vietnam's stock market in JSON or DataFrame format for comprehensive market analysis and data processing.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_formatNojson

Implementation Reference

  • The handler function for the 'get_all_symbols' MCP tool. It is decorated with @server.tool() which registers it as a tool with FastMCP. The function retrieves all stock symbols using VCIListing.symbols_by_exchange() and returns the result as JSON or pandas DataFrame based on the output_format parameter.
    @server.tool() def get_all_symbols(output_format: Literal["json", "dataframe"] = "json"): """ Get all symbols from stock market Args: output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame or json """ listing = VCIListing() df = listing.symbols_by_exchange() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
  • The @server.tool() decorator registers the get_all_symbols function as an MCP tool named 'get_all_symbols'.
    @server.tool()

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