Skip to main content
Glama
sacahan

CasualMarket

by sacahan

get_company_balance_sheet

Retrieve a company's balance sheet by stock symbol. Automatically adapts to industry-specific reporting format, providing assets, liabilities, equity, book value, and debt-to-equity ratio.

Instructions

取得上市公司資產負債表。

自動偵測公司所屬行業並使用相應的財務報表格式。 不同行業的資產負債表科目會有所不同,系統會自動適配。

使用範例: get_company_balance_sheet("2330") # 查詢台積電資產負債表 get_company_balance_sheet("2884") # 查詢玉山金資產負債表

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

Returns: MCPToolResponse[dict]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (dict): 資產負債表資訊,包含: * report_period: 報告期間 * total_assets: 總資產 * current_assets: 流動資產 * non_current_assets: 非流動資產 * total_liabilities: 總負債 * current_liabilities: 流動負債 * non_current_liabilities: 非流動負債 * equity: 股東權益 * book_value_per_share: 每股淨值 * debt_to_equity_ratio: 負債權益比 - 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

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and goes beyond a bare summary: it discloses automatic industry-specific report adaptation, the unified MCPToolResponse envelope, the exact data fields, and likely failure causes. This is strong behavioral context, though it stops short of discussing data freshness or external service dependencies.

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 with purpose first, then usage examples, parameters, returns, and errors. It is somewhat long, but every section adds information that the schema and annotations do not provide, so the length is justified.

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 one-parameter read tool with no output schema, the description supplies the return shape, error conditions, and examples, making it largely complete. It lacks only comparative information about when to use the other financial-statement tools and any mention of units/currency, but those are minor given the clear domain context.

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?

Schema coverage is 0%, so the description must define the symbol parameter; it does so clearly ('公司股票代碼') and reinforces with two real ticker examples. It could add more rules like leading-zero handling, but for a single string parameter the intent is unambiguous.

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 opening sentence '取得上市公司資產負債表' states a specific operation and resource, and the financial-statement type clearly differentiates it from siblings like get_company_income_statement. The industry-adaptation note further clarifies what the returned balance sheet covers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete invocation examples but provides no guidance on when to choose this tool over siblings (e.g., get_company_income_statement) or what problem it solves that others don't. Usage context is left entirely to inference.

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