Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_stock_valuation_ratios

Get key valuation ratios (P/E, P/B, dividend yield, ROE, EPS, book value) for a stock to assess if it is fairly priced. Enter a symbol to receive these metrics.

Instructions

取得股票估值比率分析。

提供股票的關鍵估值指標,包括本益比、股價淨值比、殖利率等, 幫助投資人評估股票的投資價值。

使用範例: get_stock_valuation_ratios("2330") # 查詢台積電估值比率 get_stock_valuation_ratios("2454") # 查詢聯發科估值比率

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

Returns: MCPToolResponse[ValuationRatiosData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (ValuationRatiosData): 估值比率資訊,包含: * symbol: 股票代碼 * pe_ratio: 本益比 (Price-to-Earnings) * pb_ratio: 股價淨值比 (Price-to-Book) * dividend_yield: 殖利率 * roe: 股東權益報酬率 * eps: 每股盈餘 * book_value: 每股淨值 - 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.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 of behavioral disclosure, and it handles this well: it describes the unified MCPToolResponse envelope, the specific data fields, and the error conditions (invalid symbol, incomplete financial data, temporarily unavailable calculations). It does not mention rate limits or auth, but these are not pressing for a read-only single-parameter retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a front-loaded purpose, usage examples, Args, Returns, and Raises sections. Although lengthy, every part adds value, especially given there is no output schema or annotations to lean on.

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 output schema and no annotations, the description is unusually complete: it states exactly what is returned, the shape of the response, the error causes, and how to invoke it. Nothing needed to call the tool correctly 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?

The input schema only declares a string 'symbol' with zero description coverage, so the description must compensate. It fully does: it names the parameter, explains it as a stock code, and provides two concrete usage examples ('2330', '2454') that establish expected format and semantics.

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 clearly identifies the operation ('取得股票估值比率分析') and specifies the exact resource: valuation ratios (P/E, P/B, dividend yield). It further enumerates the returned metrics, making it unambiguous what the tool does and how it differs from the many sibling tools focused on prices, trading, income statements, or dividends.

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?

The description implies when to use the tool—when a user needs valuation metrics to assess stock investment value—and provides concrete examples. However, it does not explicitly contrast with sibling tools or state when not to use it, so the routing guidance is implicit rather than explicit.

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