Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_all_symbol_groups

Retrieve all stock symbol groups from Vietnam's market to organize and analyze securities by category, supporting JSON or DataFrame output formats.

Instructions

Get all symbol groups from stock market
Args:
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_formatNojson

Implementation Reference

  • The handler function for the 'get_all_symbol_groups' MCP tool. It is registered via the @server.tool() decorator. Returns a hardcoded DataFrame listing all symbol groups (HOSE, HNX, etc.) as JSON or DataFrame based on output_format.
    @server.tool()
    def get_all_symbol_groups(output_format: Literal["json", "dataframe"] = "json"):
        """
        Get all symbol groups from stock market
        Args:
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        df = pd.DataFrame(
            [
                {"group": "HOSE", "group_name": "All symbols in HOSE"},
                {"group": "HNX", "group_name": "All symbols in HNX"},
                {"group": "UPCOM", "group_name": "All symbols in UPCOM"},
                {"group": "VN30", "group_name": "All symbols in VN30"},
                {"group": "VN100", "group_name": "All symbols in VN100"},
                {"group": "HNX30", "group_name": "All symbols in HNX30"},
                {"group": "VNMidCap", "group_name": "All symbols in VNMidCap"},
                {"group": "VNSmallCap", "group_name": "All symbols in VNSmallCap"},
                {"group": "VNAllShare", "group_name": "All symbols in VNAllShare"},
                {"group": "HNXCon", "group_name": "All symbols in HNXCon"},
                {"group": "HNXFin", "group_name": "All symbols in HNXFin"},
                {"group": "HNXLCap", "group_name": "All symbols in HNXLCap"},
                {"group": "HNXMSCap", "group_name": "All symbols in HNXMSCap"},
                {"group": "HNXMan", "group_name": "All symbols in HNXMan"},
                {"group": "ETF", "group_name": "All symbols in ETF"},
                {"group": "FU_INDEX", "group_name": "All symbols in FU_INDEX"},
                {"group": "CW", "group_name": "All symbols in CW"},
            ]
        )
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • Registration of the get_all_symbol_groups tool using FastMCP's @server.tool() decorator.
    @server.tool()
  • Input schema defined in function signature: output_format parameter with Literal type.
        output_format: Literal['json', 'dataframe'] = 'json'
    Returns:
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return type ('pd.DataFrame') but doesn't describe what 'symbol groups' are, how the data is structured, whether it's a read-only operation, potential rate limits, or any authentication requirements. The description is minimal and lacks essential behavioral context.

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

Conciseness3/5

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

The description is brief but structured with sections for 'Args' and 'Returns'. However, it includes redundant information (e.g., stating 'pd.DataFrame' in the Returns section when the output schema is false) and lacks front-loaded clarity about the tool's core purpose. It could be more efficiently organized to prioritize key details.

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

Completeness2/5

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

Given the complexity (retrieving financial data), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'symbol groups' are, how the data is returned, or any behavioral traits like error handling or data freshness. For a tool with potential nuances in financial contexts, this is inadequate.

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?

The description adds some value by explaining the 'output_format' parameter with its enum values and default, which isn't covered in the schema (0% coverage). However, it doesn't elaborate on what 'symbol groups' means or provide context for the parameter beyond basic syntax. With one parameter and low schema coverage, the description partially compensates but remains basic.

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 action ('Get') and resource ('all symbol groups from stock market'), making the purpose understandable. It distinguishes from siblings like 'get_all_symbols' by focusing on groups rather than individual symbols. However, it doesn't explicitly differentiate from 'get_all_symbols_by_group' which might be related.

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. The description doesn't mention when this tool is appropriate compared to siblings like 'get_all_symbols' or 'get_all_symbols_by_group', nor does it specify any prerequisites or contextual constraints for usage.

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