Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

search_fund

Search for mutual funds in Vietnam's stock market by name using partial keyword matching, returning results in JSON or DataFrame format for analysis.

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 handler function decorated with @server.tool(), implementing the search_fund tool. It uses FMarketFund to filter funds by keyword and returns the result as JSON or DataFrame.
    @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 in the FastMCP server.
    @server.tool()
  • Input schema defined by function parameters and type hints: keyword (str), output_format (json or dataframe).
    keyword: str (partial match for fund name to search) output_format: Literal['json', 'dataframe'] = 'json'

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