Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

search_fund

Search for mutual funds in the Vietnam stock market by name using partial matching and retrieve results in JSON or DataFrame format.

Instructions

Search fund by name from stock market Args: keyword: str (partial match for fund name to search) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes
output_formatNojson

Implementation Reference

  • The main handler function for the 'search_fund' tool, decorated with @server.tool() for registration in FastMCP. It searches funds using FMarketFund.filter and returns data in JSON or DataFrame format.
    @server.tool() def search_fund(keyword: str, output_format: Literal["json", "dataframe"] = "json"): """ Search fund by name from stock market Args: keyword: str (partial match for fund name to search) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ fund = FMarketFund() df = fund.filter(symbol=keyword) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
  • The @server.tool() decorator registers the search_fund function as an MCP tool named 'search_fund'.
    @server.tool()
  • Docstring and type hints define the input schema (keyword: str, output_format: Literal) and output (pd.DataFrame or JSON).
    """ Search fund by name from stock market Args: keyword: str (partial match for fund name to search) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

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