Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_all_symbols

Retrieve all stock symbols from Vietnam's stock market in JSON or DataFrame format for comprehensive market analysis and data processing.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_formatNojson

Implementation Reference

  • The handler function for the 'get_all_symbols' MCP tool. It is decorated with @server.tool() which registers it as a tool with FastMCP. The function retrieves all stock symbols using VCIListing.symbols_by_exchange() and returns the result as JSON or pandas DataFrame based on the output_format parameter.
    @server.tool()
    def get_all_symbols(output_format: Literal["json", "dataframe"] = "json"):
        """
        Get all symbols from stock market
        Args:
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame or json
        """
        listing = VCIListing()
        df = listing.symbols_by_exchange()
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • The @server.tool() decorator registers the get_all_symbols function as an MCP tool named 'get_all_symbols'.
    @server.tool()
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions return types (pd.DataFrame or json). It doesn't disclose behavioral traits such as rate limits, authentication needs, data freshness, or what 'all symbols' entails (e.g., scope, exclusions). This is inadequate for a tool with potential complexity.

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 front-loaded with the core purpose. However, the formatting with 'Args:' and 'Returns:' sections is slightly verbose for such a simple tool, and it could be more streamlined without losing clarity.

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, no output schema, and low schema coverage, the description partially compensates by explaining the parameter and return types. However, it lacks details on behavioral aspects and doesn't fully address the tool's complexity in retrieving 'all symbols', making it minimally adequate but with clear gaps.

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?

The description explicitly documents the single parameter 'output_format' with its options and default, adding meaning beyond the input schema which has 0% description coverage. Since there's only one parameter and it's fully covered in the description, this compensates well for the schema gap.

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 'all symbols from stock market', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_all_symbols_by_group' or 'get_all_symbols_by_industry', which would require a 5.

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 like the sibling tools for filtered symbol retrieval. It lacks any context about use cases, prerequisites, or comparisons to other tools in the server.

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