Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_stock_monthly_average

Get monthly average stock prices for trend analysis, technical analysis, and periodic investment performance evaluation. Provides average, weighted, volume-weighted, median price, and monthly change per month.

Instructions

取得股票月平均價格。

計算股票每月的平均成交價格,可用於觀察價格趨勢、 技術分析參考,以及定期定額投資績效評估。

使用範例: get_stock_monthly_average("2330") # 查詢台積電月均價 get_stock_monthly_average("0050") # 查詢0050月均價

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

Returns: MCPToolResponse[MonthlyAverageData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (MonthlyAverageData): 月平均價格資訊,包含: * symbol: 股票代碼 * monthly_averages: 月平均列表,每項包含: - year_month: 年月 (YYYY-MM) - average_price: 月平均成交價 - weighted_average: 加權平均價 - median_price: 中位數價格 - volume_weighted_price: 成交量加權價 - trading_days: 交易日數 - monthly_change: 月變化百分比 - 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.3/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 burden and does a good job: it documents the MCPToolResponse wrapper, nested data fields, and failure reasons. It still doesn't mention data freshness, delivery window, or authentication expectations, but for a read-only data query it is fairly transparent.

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 text is well-organized with sections (purpose, examples, args, returns, raises) and front-loaded. It is a bit repetitive in the opening sentences and longer than necessary in the return list, but the detail is useful since there is no output schema.

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 query with no output schema and no annotations, the description is complete: input semantics, usage examples, full return structure, nested fields, and likely error causes are all present. Nothing essential is missing for correct invocation.

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 description coverage is 0%, so the description must explain the lone parameter. It defines symbol as 股票代碼 and gives real examples ('2330', '0050'), fully compensating for the bare 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 clearly states it retrieves/calculates monthly average transaction prices for a stock, which is a specific verb+resource. It is implicitly distinct from monthly trading-volume siblings by focusing on average price, but it does not explicitly name or contrast an alternative 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?

It gives explicit use contexts (trend observation, technical analysis, regular-amount investment performance) and a concrete invocation example. It lacks 'when not to use' or explicit alternative routing, so it does not reach 5.

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