Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_fund_industry_holding

Retrieve industry allocation data for mutual funds to analyze investment distribution across sectors in Vietnam's stock market.

Instructions

Get industry holding of a fund from stock market
Args:
    symbol: str (symbol of the fund to get industry holding)
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
output_formatNojson

Implementation Reference

  • The handler function decorated with @server.tool(), which registers the tool and defines its schema via type hints and docstring. It retrieves the fund's industry holdings using the vnstock library's FMarketFund and returns the data in JSON or DataFrame format.
    @server.tool()
    def get_fund_industry_holding(
        symbol: str, output_format: Literal["json", "dataframe"] = "json"
    ):
        """
        Get industry holding of a fund from stock market
        Args:
            symbol: str (symbol of the fund to get industry holding)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        fund = FMarketFund()
        df = fund.details.industry_holding(symbol=symbol)
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return type 'pd.DataFrame' but does not explain what 'industry holding' entails (e.g., data structure, timeframes, or limitations like rate limits or authentication needs). This leaves significant gaps in understanding the tool's behavior beyond basic input-output.

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

Conciseness4/5

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

The description is front-loaded with the core purpose, followed by structured Args and Returns sections, making it efficient and easy to parse. It avoids unnecessary verbosity, though minor improvements in clarity (e.g., explaining 'industry holding' briefly) could enhance it further.

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 the complexity of financial data tools, no annotations, and no output schema, the description is moderately complete. It covers basic input parameters and return type but lacks details on output structure, error handling, or integration with sibling tools, making it sufficient for minimal use but with clear gaps for robust agent operation.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It adds meaning by specifying 'symbol' as 'symbol of the fund to get industry holding' and 'output_format' with options and default, which clarifies beyond the bare schema. However, it does not fully detail parameter constraints or examples, resulting in an adequate but incomplete enhancement.

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 'Get' and resource 'industry holding of a fund from stock market', making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'get_fund_asset_holding' or 'get_fund_top_holding', which might have overlapping or related functions, preventing a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives, such as 'get_fund_asset_holding' or 'get_fund_top_holding' from the sibling list. It lacks context about use cases, prerequisites, or exclusions, leaving the agent without clear direction for selection.

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