Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_margin_trading_info

Check margin trading balances and short selling activity to assess market sentiment. Retrieve financing and securities lending data with utilization rates.

Instructions

取得融資融券資訊。

提供市場整體及個股的融資融券統計資料,包括融資餘額、 融券餘額、資券相抵等,可用於觀察市場籌碼面變化。

使用範例: get_margin_trading_info() # 查詢融資融券資訊

Args: 無參數

Returns: MCPToolResponse[MarginTradingData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (MarginTradingData): 融資融券資訊,包含: * trading_date: 資料日期 * financing: 融資資訊 - balance: 融資餘額 (億元) - daily_buy: 今日融資買進 - daily_sell: 今日融資賣出 - net_change: 淨變化 - utilization_rate: 使用率 (%) * securities_lending: 融券資訊 - balance: 融券餘額 (億元) - daily_lend: 今日融券借出 - daily_return: 今日融券返還 - net_change: 淨變化 - utilization_rate: 使用率 (%) * margin_trading_summary: 整體摘要 - 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/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral transparency burden. It explains the unified response format, enumerates return fields, and lists realistic failure scenarios including non-trading days and temporary service problems. The only gap is ambiguity about how '個股' data is delivered when the tool has no parameters.

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 clear sections: summary, usage example, args, returns, and raises. The usage example is slightly redundant, but the detailed Returns and Raises sections justify the length because there is no output schema.

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

Completeness4/5

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

For a no-argument read tool, the description covers the key information an agent needs: what data is returned, the structure of the response, and likely failure conditions. The main omission is clarifying whether individual-stock data is returned or how to access it, given the claim about '個股' with zero parameters.

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 input schema has zero parameters and the description explicitly states '無參數', so there is no parameter ambiguity. With zero parameters, the baseline is 4, and the description confirms the absence rather than requiring the agent to infer it from the schema alone.

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 resource ('融資融券資訊') and the scope ('市場整體及個股'), and explains the intended analytical use ('觀察市場籌碼面變化'). This makes it distinguishable from siblings such as price, revenue, or foreign-holdings tools, though it does not explicitly name any sibling.

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 gives clear context for when to use the tool: when margin trading statistics such as financing balance, short-selling balance, and offset ratio are needed. It does not explicitly mention when not to use it or name alternatives, but the use case is clear enough for an agent to select it appropriately.

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