Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_quote_intraday_price

Retrieve intraday stock price data for Vietnam market symbols to analyze real-time trading patterns and price movements.

Instructions

Get quote intraday price from stock market
Args:
    symbol: str (symbol to get intraday price)
    page_size: int = 500 (max: 100000) (number of rows to return)
    last_time: str = None (last time to get intraday price from)
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
page_sizeNo
last_timeNo
output_formatNojson

Implementation Reference

  • The handler function for the 'get_quote_intraday_price' tool. It uses vnstock.Quote to fetch intraday price data with pagination and optional last_time filter, returning the result as JSON or pandas DataFrame.
    @server.tool()
    def get_quote_intraday_price(
        symbol: str,
        page_size: int = 100,
        last_time: str = None,
        output_format: Literal["json", "dataframe"] = "json",
    ):
        """
        Get quote intraday price from stock market
        Args:
            symbol: str (symbol to get intraday price)
            page_size: int = 500 (max: 100000) (number of rows to return)
            last_time: str = None (last time to get intraday price from)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        quote = Quote(symbol=symbol, source="VCI")
        df = quote.intraday(page_size=page_size, last_time=last_time)
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • The @server.tool() decorator registers the get_quote_intraday_price function as an MCP tool.
    @server.tool()
  • Input schema defined by the function parameters with type hints and defaults.
        symbol: str,
        page_size: int = 100,
        last_time: str = None,
        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 the return type ('pd.DataFrame') and output format options, but doesn't describe pagination behavior (despite having a 'page_size' parameter), rate limits, authentication requirements, data freshness, or error conditions. For a financial data tool with 4 parameters, 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 a clear structure: purpose statement followed by parameter explanations. However, it includes redundant information - the return type 'pd.DataFrame' is mentioned in both the description body and the 'Returns' section. The formatting with 'Args:' and 'Returns:' sections is helpful but could be more integrated.

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 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description does an adequate job explaining parameters and return format. However, it lacks important context about data source, update frequency, limitations (e.g., which markets/exchanges are supported), and error handling. For a financial data retrieval tool, users need more operational 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 substantial value beyond the 0% schema description coverage. It explains each parameter's purpose: 'symbol' (stock symbol), 'page_size' (number of rows, with max noted), 'last_time' (starting point for data), and 'output_format' (format options). This compensates well for the schema's lack of descriptions, though it doesn't specify time format for 'last_time' or clarify what 'rows' represent in the return data.

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 tool's purpose: 'Get quote intraday price from stock market' - a specific verb ('Get') and resource ('quote intraday price'). It distinguishes from siblings like 'get_quote_history_price' by specifying 'intraday' rather than historical data. However, it doesn't explicitly contrast with other price-related tools like 'get_price_board' or 'get_quote_price_depth'.

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. It doesn't mention when intraday price data is appropriate compared to historical data from 'get_quote_history_price' or other price-related tools. There are no usage prerequisites, exclusions, or comparisons with sibling tools.

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