Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_company_ratio_summary

Retrieve financial ratio summaries for Vietnam-listed companies to analyze performance metrics and make informed investment decisions.

Instructions

Get company ratio summary from stock market
Args:
    symbol: str
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
output_formatNojson

Implementation Reference

  • The handler function implementing the get_company_ratio_summary tool. It is registered via the @server.tool() decorator. The function signature defines the input schema (symbol: str, output_format: Literal["json", "dataframe"] = "json"). It uses VCICompany from vnstock to fetch ratio_summary and returns formatted data.
    @server.tool()
    def get_company_ratio_summary(
        symbol: str, output_format: Literal["json", "dataframe"] = "json"
    ):
        """
        Get company ratio summary from stock market
        Args:
            symbol: str
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        equity = VCICompany(symbol=symbol)
        df = equity.ratio_summary()
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return type ('pd.DataFrame') but does not describe key behaviors like whether this is a read-only operation, potential rate limits, authentication needs, or what happens with invalid symbols. The description is minimal and misses critical operational context.

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 structured with clear sections for Args and Returns, making it easy to parse. It is concise with no wasted words, though the front-loading could be improved by starting with a more detailed purpose statement before listing parameters.

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 of financial data tools, no annotations, and no output schema, the description is incomplete. It lacks details on return format (e.g., structure of the DataFrame), error handling, or examples, making it inadequate for an AI agent to use effectively without additional context.

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 lists parameters ('symbol', 'output_format') and their types, adding basic semantics beyond the input schema, which has 0% description coverage. However, it does not explain what 'symbol' represents (e.g., stock ticker) or the implications of 'output_format' choices, leaving gaps in understanding despite compensating somewhat for the schema's lack of descriptions.

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 ('company ratio summary from stock market'), making the purpose understandable. It distinguishes itself from siblings like 'get_finance_ratios' by specifying 'summary' and 'company' focus, though it could be more explicit about what 'ratio summary' entails compared to other financial tools.

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 like 'get_finance_ratios' or 'get_company_overview'. The description lacks context about prerequisites, such as needing a valid stock symbol, or comparisons to sibling tools for financial data retrieval.

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