Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_cash_flows

Retrieve cash flow statements for Vietnamese companies to analyze financial performance over quarterly or annual periods.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
periodNoyear
output_formatNojson

Implementation Reference

  • The handler function implementing the get_cash_flows tool. It is registered via the @server.tool() decorator. Fetches cash flow statements using vnstock's VCIFinance class and returns the raw DataFrame (note: does not handle 'json' output_format). The type hints define the input schema.
    @server.tool()
    def get_cash_flows(
        symbol: str,
        period: Literal["quarter", "year"] = "year",
        output_format: Literal["json", "dataframe"] = "json",
    ):  # pyright: ignore[reportUndefinedVariable]
        """
        Get cash flows of a company from stock market
        Args:
            symbol: str (symbol of the company to get cash flows)
            period: Literal['quarter', 'year'] = 'year' (period to get cash flows)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        finance = VCIFinance(symbol=symbol, period=period)
        df = finance.cash_flow()
        return df
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 the return type (pd.DataFrame) but omits critical details like data source reliability, rate limits, authentication needs, error handling, or whether this is a read-only operation. For a financial data tool with zero annotation coverage, this is insufficient.

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 structured with clear sections (Args, Returns) but includes redundant information (e.g., repeating defaults already in schema) and could be more front-loaded. The first sentence states the purpose, but subsequent details could be trimmed for efficiency.

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 3 parameters with 0% schema coverage, the description is moderately complete. It covers parameters and return type but lacks behavioral context (e.g., data freshness, limitations) and doesn't fully address the tool's complexity in a financial data context.

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 significant value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose (symbol, period, output_format) and provides type hints and defaults, compensating well for the schema's lack of descriptions. However, it doesn't clarify semantic nuances like symbol format requirements.

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 cash flows') and resource ('of a company from stock market'), making the purpose understandable. However, it doesn't explicitly differentiate this tool from similar siblings like get_balance_sheets or get_income_statements, 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 get_balance_sheets or get_income_statements. It lacks context about use cases, prerequisites, or exclusions, offering only basic parameter documentation.

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