Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_top_foreign_holdings

Get the top 20 stocks with the highest foreign ownership percentage, including shares and daily net buy/sell, to monitor foreign investors' key positions.

Instructions

取得外資持股前20名。

列出外資持股比例最高的前20檔個股,包括持股比例、持股張數、 當日買賣超等資訊,可瞭解外資重點布局標的。

使用範例: get_top_foreign_holdings() # 查詢外資持股前20名

Args: 無參數

Returns: MCPToolResponse[TopForeignHoldingsData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data: 外資持股前20名資訊列表,每項包含: * rank: 排名 * symbol: 股票代碼 * company_name: 公司名稱 * foreign_holding: 外資持股張數 * percentage: 外資持股比例 (%) * recent_change: 近期買賣超變化 - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱

Raises: 查詢失敗時返回錯誤回應,可能的原因: - 非交易日無資料 - 資料來源暫時無法存取 - 服務暫時異常

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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. It discloses failure modes such as non-trading days and temporary service issues, and describes the return envelope. It lacks details like data timing or refresh behavior, but for a read-only no-argument tool the disclosure is reasonably complete.

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 with a summary, usage example, Args, Returns, and Raises sections. There is minor redundancy between the opening sentence and the explanatory second sentence, but overall every major section earns its place.

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 no-parameter tool with no output schema and no annotations, the description fully covers the return fields, error cases, and invocation. An agent has everything it needs to call the tool and interpret the result.

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

Parameters4/5

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

The tool has zero parameters, so the input schema is trivially complete and the description's explicit '無參數' plus usage example adds no necessary semantics. The baseline of 4 for zero-parameter tools is appropriate.

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 states a specific verb and resource: it retrieves the top 20 stocks by foreign shareholding percentage, and lists the main returned fields. This clearly distinguishes it from related siblings like get_foreign_investment_by_industry, which covers industry-level foreign investment.

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 provides a clear use case ('可瞭解外資重點布局標的') and a usage example, making the intended context evident. However, it does not explicitly contrast this tool with alternatives such as get_foreign_investment_by_industry, so some routing inferences are left to the agent.

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