Skip to main content
Glama
24mlight

A Share MCP

is_trading_day

Check if a specific date is a trading day for A-share stock markets to plan investments and avoid non-trading periods.

Instructions

Check if a specific date is a trading day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes

Implementation Reference

  • The MCP tool handler for 'is_trading_day', decorated with @app.tool() for automatic registration and execution. It wraps the use case call with error handling.
    @app.tool()
    def is_trading_day(date: str) -> str:
        """Check if a specific date is a trading day."""
        return run_tool_with_handling(
            lambda: uc_date.is_trading_day(active_data_source, date=date),
            context=f"is_trading_day:{date}",
        )
  • Core helper function implementing the trading day check by fetching trade dates from data source and inspecting the 'is_trading_day' field.
    def is_trading_day(data_source: FinancialDataSource, *, date: str) -> str:
        df = _fetch_trading_days(data_source, start_date=date, end_date=date)
        if df.empty:
            return "未知"
        row = df.iloc[0]
        return "是" if str(row.get("is_trading_day", "")) == "1" else "否"
  • mcp_server.py:56-56 (registration)
    Invocation of the registration function that defines and registers the 'is_trading_day' tool along with other date utilities.
    register_date_utils_tools(app, active_data_source)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool's function but lacks behavioral details such as what constitutes a 'trading day' (e.g., market holidays, weekends), error handling for invalid dates, or response format. This leaves significant gaps for an agent to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose, making it highly efficient and easy to parse for an agent.

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 lack of annotations, no output schema, and minimal parameter guidance, the description is incomplete. For a tool that checks trading status—which involves domain-specific rules—it should explain more about behavior, input expectations, and output to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and one required parameter ('date'), the description adds minimal value. It implies the parameter is a date but doesn't specify format (e.g., YYYY-MM-DD), timezone, or valid range. This is insufficient compensation for the schema's lack of documentation.

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 with a specific verb ('Check') and resource ('trading day'), making it immediately understandable. However, it doesn't explicitly differentiate from siblings like 'get_trade_dates' or 'last_n_trading_days', which reduces it from a perfect score.

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 siblings like 'get_trade_dates' (which might list multiple dates) and 'last_n_trading_days' (which focuses on recent dates), the agent has no explicit direction on choosing this specific tool for checking a single date's trading status.

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/24mlight/a_share_mcp_is_just_I_need'

If you have feedback or need assistance with the MCP directory API, please join our Discord server