Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_taiwan_stock_price

Retrieve real-time Taiwan stock prices using a stock code or company name. Get current price, change, volume, high/low, open, and previous close to make informed decisions.

Instructions

取得台灣股票即時價格資訊。

支援股票代碼或公司名稱查詢:

  • 股票代碼: 4-6位數字 + 可選字母 (例如: 2330, 0050, 00648R)

  • 公司名稱: 完整或部分公司名稱 (例如: "台積電", "鴻海")

使用範例: get_taiwan_stock_price("2330") # 使用股票代碼 get_taiwan_stock_price("台積電") # 使用公司名稱 get_taiwan_stock_price("0050") # 查詢ETF

Args: symbol: 台灣股票代號或公司名稱

Returns: MCPToolResponse[StockPriceData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (StockPriceData): 股票價格資訊,包含: * symbol: 股票代碼 * company_name: 公司名稱 * current_price: 當前價格 * change: 漲跌金額 * change_percent: 漲跌幅百分比 * volume: 成交量 * high/low/open: 最高/最低/開盤價 * previous_close: 昨收價 * last_update: 最後更新時間 - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱 - timestamp: 回應時間戳

Raises: 查詢失敗時返回錯誤回應,可能的原因: - 股票代碼不存在 - 網路連線問題 - API 服務異常

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It thoroughly explains the unified MCPToolResponse format, enumerates all StockPriceData fields, and clearly states error conditions with likely causes. It does not mention potential data latency or rate limits, but for a read-only query tool the behavioral coverage is strong.

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 well-structured and front-loaded with the core purpose, followed by symbol formats, examples, args, returns, and errors. It is somewhat long but every section contributes useful information, so no part feels wasted.

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 single-parameter tool with no annotations and no output schema, the description is complete: it covers input formatting, return structure with field names, and possible error causes. Nothing an agent needs to make a correct call is missing.

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?

Schema coverage is 0% and the schema only declares symbol as a string. The description fully compensates: it defines symbol as a 4-6 digit code with optional letters or a full/partial company name, gives concrete examples including an ETF, and explains partial-name matching. This adds substantial meaning beyond the schema.

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 opens with a clear verb+resource statement: '取得台灣股票即時價格資訊' (get Taiwan stock real-time price info). It further clarifies accepted input types (codes vs. names) with examples, but it does not explicitly distinguish itself from siblings like get_real_time_trading_stats or get_stock_daily_trading.

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?

Usage is implied through the description of querying by code or company name and the examples provided, but there is no explicit statement of when to use this tool versus alternatives. Sibling tools are not referenced, and no exclusions or conditions are given.

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