Skip to main content
Glama
sacahan

CasualMarket

by sacahan

check_taiwan_trading_day

Check whether a Taiwan stock market is open on a specific date, factoring in weekends and holidays. Returns trading status and reason for closure.

Instructions

檢查台灣股市是否為交易日。

綜合考慮週末和國定假日,判斷指定日期是否為台灣股市的交易日。 台灣股市交易日條件:非週末且非國定假日。

使用範例: check_taiwan_trading_day("2025-01-01") # 元旦(非交易日) check_taiwan_trading_day("2025-10-06") # 中秋節(非交易日) check_taiwan_trading_day("2025-10-07") # 一般工作日(交易日) check_taiwan_trading_day("2025-10-11") # 週六(非交易日)

Args: date: 要檢查的日期,格式為 YYYY-MM-DD (例如: "2025-01-01")

Returns: MCPToolResponse[TradingDayStatusData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (TradingDayStatusData): 交易日狀態資訊,包含: * date: 查詢日期 * is_trading_day: 是否為交易日 * is_weekend: 是否為週末 * is_holiday: 是否為國定假日 * holiday_name: 節假日名稱(如果是節假日) * reason: 不是交易日的原因(如果不是交易日) - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱

Raises: 查詢失敗時返回錯誤回應,可能的原因: - 日期格式錯誤 - API 服務異常 - 網路連線問題

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/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. It discloses the response structure, success/error fields, possible failure reasons, and example outcomes. It does not mention authorization or rate limits, but for a read-only date-checking tool the behavior is described sufficiently.

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 well-structured with purpose, examples, arguments, returns, and error conditions. It front-loads the core purpose and each section adds necessary information. Although lengthy, the length is justified because there is no output schema and the return structure must be explained.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read-only date check with no annotations and no output schema, the description is essentially complete: it gives the input format, the decision logic, examples, return fields, and error scenarios. The only minor gap is distinguishing it from get_taiwan_holiday_info, which was already reflected in the usage-guidelines score.

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

Parameters5/5

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

The input schema only declares 'date' as a string with no description, giving 0% schema coverage. The description compensates fully by specifying the YYYY-MM-DD format, providing concrete examples, and explaining the parameter purpose. This is exactly the kind of compensation needed for a single low-information schema parameter.

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 checks whether a given date is a Taiwan stock market trading day, with specific conditions (not weekend, not holiday). It is unambiguous and distinct in function from price/order tools, but it does not explicitly differentiate itself from the sibling get_taiwan_holiday_info, so it stops just short of 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives examples and explains the trading-day condition, making the intended use clear. However, it does not explicitly say when to prefer this tool over alternatives such as get_taiwan_holiday_info, nor does it describe exclusions or edge cases like makeup workdays or rescheduled holidays.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.