Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

list_all_funds

Retrieve comprehensive lists of mutual funds from Vietnam's stock market, filterable by fund type (balanced, bond, or stock) and available in JSON or dataframe formats.

Instructions

List all funds from stock market Args: fund_type: Literal['BALANCED', 'BOND', 'STOCK', None ] = None (if None, return funds in all types) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fund_typeNo
output_formatNojson

Implementation Reference

  • The core handler function for the 'list_all_funds' MCP tool. Decorated with @server.tool() for automatic registration and schema inference from type hints. Fetches fund listing data using vnstock's FMarketFund.listing() and returns as JSON string or pandas DataFrame.
    @server.tool() def list_all_funds( fund_type: Literal["BALANCED", "BOND", "STOCK", None] = None, output_format: Literal["json", "dataframe"] = "json", ): # pyright: ignore[reportUndefinedVariable] """ List all funds from stock market Args: fund_type: Literal['BALANCED', 'BOND', 'STOCK', None ] = None (if None, return funds in all types) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ fund = FMarketFund() df = fund.listing(fund_type=fund_type) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
  • MCP tool registration decorator applied to the list_all_funds function, integrating it into the FastMCP server.
    @server.tool()
  • Input schema defined by type annotations (Literals for fund_type and output_format) and docstring, used by MCP for validation.
    fund_type: Literal["BALANCED", "BOND", "STOCK", None] = None, 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