Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_balance_sheets

Retrieve company balance sheets from Vietnam's stock market by specifying a stock symbol, period (quarter/year), and output format (JSON/dataframe).

Instructions

Get balance sheets of a company from stock market
Args:
    symbol: str (symbol of the company to get balance sheets)
    period: Literal['quarter', 'year'] = 'year' (period to get balance sheets)
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
periodNoyear
output_formatNojson

Implementation Reference

  • The handler function decorated with @server.tool(), implementing the get_balance_sheets tool. It retrieves balance sheet data for a given stock symbol and period using VCIFinance.balance_sheet() and returns it in JSON or DataFrame format.
    @server.tool()
    def get_balance_sheets(
        symbol: str,
        period: Literal["quarter", "year"] = "year",
        output_format: Literal["json", "dataframe"] = "json",
    ):  # pyright: ignore[reportUndefinedVariable]
        """
        Get balance sheets of a company from stock market
        Args:
            symbol: str (symbol of the company to get balance sheets)
            period: Literal['quarter', 'year'] = 'year' (period to get balance sheets)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        finance = VCIFinance(symbol=symbol, period=period)
        df = finance.balance_sheet()
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • The @server.tool() decorator registers the get_balance_sheets function as an MCP tool.
    @server.tool()
  • Type annotations defining the input schema for the tool parameters.
    symbol: str,
    period: Literal["quarter", "year"] = "year",
    output_format: Literal["json", "dataframe"] = "json",
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what data is retrieved but lacks critical behavioral information: no indication of data freshness, rate limits, authentication requirements, error conditions, or what happens with invalid symbols. The return format is mentioned but without details about structure or content.

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 well-structured with clear sections for Args and Returns, making it easy to parse. It's appropriately sized for a 3-parameter tool, though the main description sentence could be more specific about what balance sheet data includes.

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?

For a financial data retrieval tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It lacks information about data sources, update frequency, error handling, authentication needs, and detailed return structure. The mention of pd.DataFrame in Returns is helpful but insufficient without schema details.

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 provides meaningful semantic context for all three parameters beyond the schema's 0% coverage. It explains that 'symbol' represents the company symbol, 'period' controls the reporting period, and 'output_format' determines the return format. This adds significant value over the bare schema, though it doesn't elaborate on format differences or period implications.

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 'balance sheets of a company from stock market', making the purpose specific and understandable. It distinguishes from some siblings like 'get_income_statements' by specifying balance sheets, but doesn't explicitly differentiate from all financial data tools in the sibling list.

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 about when to use this tool versus alternatives. The description doesn't mention when this tool is appropriate compared to other financial data tools in the sibling list, nor does it provide any context about prerequisites or typical use cases.

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