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",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the return type ('pd.DataFrame') but lacks critical behavioral details like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens if no funds match the criteria. The description is minimal beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and well-structured: a clear purpose statement followed by Args and Returns sections with bullet-like formatting. Every sentence earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides basic functionality and parameter semantics but lacks important context like error conditions, performance characteristics, or relationship to sibling tools. It's minimally adequate but leaves gaps for a tool that presumably queries financial data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining both parameters: 'fund_type' (with enum values and None behavior) and 'output_format' (with enum values and default). This adds meaningful semantics beyond the bare schema, though it doesn't cover all possible nuances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all funds from stock market'), providing a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'search_fund' or 'get_fund_asset_holding', which could have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'search_fund' or other fund-related tools. The description only explains what the tool does, not when it's appropriate or preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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