Skip to main content
Glama
sacahan

CasualMarket

by sacahan

sell_taiwan_stock

Execute simulated Taiwan stock sell orders, calculating brokerage fees and 0.3% securities transaction tax. Supports market or limit prices; quantities must be multiples of 1,000 shares.

Instructions

模擬台灣股票賣出操作。

執行模擬的股票賣出交易,計算手續費、證券交易稅等費用。 注意:台股最小交易單位為1000股(1張),賣出時需扣除0.3%證券交易稅。

使用範例: sell_taiwan_stock("2330", 1000) # 市價賣出1張台積電 sell_taiwan_stock("2330", 1000, 530.0) # 限價530元賣出1張台積電

Args: symbol: 股票代碼 (例如: "2330") quantity: 賣出股數,必須是1000的倍數 (台股最小單位為1000股) price: 指定價格 (可選,不指定則為市價)

Returns: MCPToolResponse[TradingResultData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (TradingResultData): 交易結果資訊,包含: * symbol: 股票代碼 * action: 交易動作 ("sell") * quantity: 交易股數 * price: 成交價格 * total_amount: 交易總金額 * fee: 手續費 * tax: 證券交易稅(0.3%) * net_amount: 實際收入金額 * timestamp: 交易時間 - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱

Raises: 交易失敗時返回錯誤回應,可能的原因: - 股票代碼不存在 - 交易股數不符合規定(非1000的倍數) - 指定價格超出漲跌停限制 - 模擬交易系統異常

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceNo
symbolYes
quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and discloses simulation semantics, 0.3% transaction tax, the 1000-share lot rule, optional price behavior, failure modes, and the full response structure. This makes the operational behavior predictable and goes well beyond minimal disclosure.

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 organized into intro, note, examples, Args, Returns, and Raises sections; every section contributes useful information. The 1000-share rule appears in both the note and Args, but this minor redundancy does not hurt clarity.

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?

This is a trading action with no output schema, but the description provides input constraints, return fields and their meanings, tax rate, example calls, and error conditions. An agent has everything needed to invoke the tool correctly.

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 has 0% description coverage, so the description must compensate; it fully explains symbol with an example, quantity with the mandatory 1000-multiple constraint, and price as optional/market/default. This adds real meaning beyond the bare schema names and types.

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: simulating a Taiwan stock sell transaction and computing fees/tax. It also distinguishes the tool from the sibling getters and from buy_taiwan_stock by naming the sell/simulation action.

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?

Concrete call examples show market and limit orders, and the description states that omitting price means a market order. It also warns about the 1000-share minimum unit. It does not explicitly name alternatives or when-not-to-use, but the sell-vs-buy/getting context is clear.

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