Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_stock_yearly_trading

Get annual trading statistics for any Taiwan stock to analyze long-term performance. View yearly volume, value, average price, high/low prices, trading days, and percentage change.

Instructions

取得股票年交易資訊。

提供股票每年的交易統計資料,包括年成交量、年成交金額、 年均價、年度漲跌幅等,適合長期投資分析與歷史回顧。

使用範例: get_stock_yearly_trading("2330") # 查詢台積電年交易資訊 get_stock_yearly_trading("2454") # 查詢聯發科年交易資訊

Args: symbol: 股票代碼 (例如: "2330")

Returns: MCPToolResponse[YearlyTradingData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (YearlyTradingData): 年交易資訊,包含: * symbol: 股票代碼 * yearly_data: 年交易列表,每項包含: - year: 年度 - total_volume: 年成交量 - total_value: 年成交金額 - average_price: 年均價 - highest_price: 年最高價 - lowest_price: 年最低價 - trading_days: 交易日數 - year_change_percent: 年度漲跌幅 (%) - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱

Raises: 查詢失敗時返回錯誤回應,可能的原因: - 股票代碼不存在 - 年交易資料尚未彙整 - 資料來源暫時無法存取

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/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 behavioral disclosure burden. It clarifies the operation is a read-only query ('查詢'/'取得'), describes the MCPToolResponse envelope and all nested data fields, and lists likely failure causes such as invalid symbol, missing aggregated data, and temporary source unavailability. Minor omissions like rate limits or authentication are not material for this simple query tool.

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-organized with purpose, examples, Args, Returns, and Raises sections. The detailed return-field breakdown is justified because there is no output schema, so it adds essential value rather than redundancy.

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 tool with no annotations and no output schema, the description provides everything needed to call it correctly: invocation syntax, expected return structure, and error scenarios. Minor details like ordering of yearly data or unit conventions are not critical for successful use.

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 symbol as a required string with 0% description coverage. The description compensates fully by defining symbol as '股票代碼' and providing real examples ('2330' for TSMC, '2454' for MediaTek), so the meaning and format of the parameter are unambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: '取得股票年交易資訊' (get stock yearly trading information). It further enumerates the exact fields returned (yearly volume, amount, average price, yearly change), making it clear that this tool is distinct from sibling tools like get_stock_daily_trading or get_stock_monthly_trading.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description clearly states the intended use case: '適合長期投資分析與歷史回顧' (suitable for long-term investment analysis and historical review), and provides concrete calling examples. It does not explicitly mention when not to use this tool or name sibling alternatives, but the annual scope makes the intended context clear.

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