Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_company_income_statement

Fetch a company's income statement by stock symbol, including revenue, operating income, net income, EPS, and industry-specific items. Adapts to the company's industry automatically.

Instructions

取得上市公司綜合損益表。

自動偵測公司所屬行業並使用相應的財務報表格式。 支援不同行業的特殊會計科目和計算方式。

支援行業別:

  • 一般業:製造業、科技業等傳統產業

  • 金融業:銀行、證券、期貨等金融機構

  • 金控業:金融控股公司

  • 保險業:壽險、產險等保險公司

  • 異業:其他特殊行業

使用範例: get_company_income_statement("2330") # 查詢台積電(一般業) get_company_income_statement("2884") # 查詢玉山金(金控業) get_company_income_statement("2886") # 查詢兆豐金(金控業)

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

Returns: MCPToolResponse[dict]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (dict): 綜合損益表資訊,包含: * report_period: 報告期間 * revenue: 營業收入 * operating_cost: 營業成本 * gross_profit: 毛利 * operating_expense: 營業費用 * operating_income: 營業利益 * non_operating_income: 營業外收入 * pre_tax_income: 稅前淨利 * net_income: 稅後淨利 * eps: 每股盈餘 * industry_specific_items: 行業特有科目 - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱

Raises: 查詢失敗時返回錯誤回應,可能的原因: - 公司代碼不存在 - 財報資料尚未公布 - OpenAPI 服務異常 - 行業別偵測失敗

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?

No annotations are provided, so the description carries the full burden, and it largely fulfills it. It discloses the industry-detection behavior (自動偵測公司所屬行業並使用相應的財務報表格式), lists supported industry categories, details the complete return structure, and explicitly enumerates likely error reasons. The main gap is that it does not state whether the operation is read-only or if any side effects exist, but for a lookup tool this is minor.

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 longer than average, but every section earns its place: purpose, industry support, examples, parameter spec, return format, and error conditions. It is well-structured with clear headers and code blocks, making it scannable despite the length. A small reduction from 5 because the Returns section could arguably be compressed given the absence of an output schema still justifies its detail.

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 remarkably complete. It covers what the tool does, how it behaves across industries, the exact return structure with field names, and the possible error scenarios. An agent has everything needed to invoke it correctly and interpret the result without external knowledge.

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 fully compensate. It does: the Args section clearly defines symbol as '公司股票代碼' with the example '2330', and the usage examples provide concrete values for different industry contexts. With only one parameter, this is complete and actionable guidance.

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 begins with a specific verb and resource: '取得上市公司綜合損益表' (obtain listed company income statement), which is unambiguous. It distinguishes itself from siblings like get_company_balance_sheet by naming the exact financial statement type and adding the industry-detection behavior, making the tool's scope immediately clear.

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 usage through the tool's name and the examples showing common stock symbols, and it explains the industry-specific formatting behavior. However, it does not explicitly state when to prefer this tool over siblings such as get_company_balance_sheet or get_company_profile, nor does it provide exclusion criteria or alternative recommendations. Usage context is clear but not actively differentiated.

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