Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_income_statements

Retrieve company income statements from Vietnam's stock market to analyze financial performance over quarterly or annual periods.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
periodNoyear
output_formatNojson

Implementation Reference

  • The main handler function for the 'get_income_statements' tool, registered via @server.tool(). It uses VCIFinance to fetch income statement data for a given symbol and period, returning it as JSON or DataFrame.
    @server.tool()
    def get_income_statements(
        symbol: str,
        period: Literal["quarter", "year"] = "year",
        output_format: Literal["json", "dataframe"] = "json",
    ):
        """
        Get income statements of a company from stock market
        Args:
            symbol: str (symbol of the company to get income statements)
            period: Literal['quarter', 'year'] = 'year' (period to get income statements)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        finance = VCIFinance(symbol=symbol, period=period)
        df = finance.income_statement()
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • Registration of the get_income_statements tool using the FastMCP @server.tool() decorator.
    @server.tool()
  • Input schema defined by function parameters with type hints and Literal constraints.
        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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions the return type (pd.DataFrame), it doesn't describe authentication needs, rate limits, data freshness, error conditions, or what happens with invalid symbols. For a financial data tool with zero annotation coverage, this leaves significant behavioral gaps.

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 reasonably concise with clear sections (Args, Returns). However, the first sentence is somewhat redundant with the tool name, and the structure could be more front-loaded with key usage information. The parameter explanations are efficient but the overall flow could be improved for quick scanning.

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 (financial data retrieval with 3 parameters), no annotations, and no output schema, the description is moderately complete. It covers basic parameter semantics and return type but lacks behavioral context, error handling, data source details, and comparison with sibling tools. The absence of output schema means the description should ideally explain the DataFrame structure more thoroughly.

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 adds substantial value beyond the input schema, which has 0% description coverage. It explains that 'symbol' is the company symbol, 'period' can be quarter or year with a default, and 'output_format' controls the return format. This compensates well for the schema's lack of descriptions, though it doesn't elaborate on symbol format requirements 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 ('income statements of a company from stock market'), making the purpose specific and understandable. It distinguishes this tool from siblings like get_balance_sheets and get_cash_flows by focusing on income statements specifically. However, it doesn't explicitly contrast with other financial data tools beyond the name difference.

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. With many sibling tools available (e.g., get_balance_sheets, get_cash_flows, get_company_overview), there's no indication of when income statements are appropriate versus other financial data. No prerequisites, exclusions, or contextual recommendations are mentioned.

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