Skip to main content
Glama
tw-stock-mcp

tw-stock-mcp

by jiawei-hong

Get company fundamentals

get_fundamentals
Read-onlyIdempotent

Retrieve fundamentals for Taiwan-listed companies, including valuation, monthly revenue growth, and quarterly EPS/margins, to assess financial performance and value.

Instructions

Latest fundamentals for Taiwan-listed companies (TWSE and TPEx): valuation (P/E, dividend yield, P/B), the latest monthly revenue with MoM/YoY growth, and the latest quarterly income statement with EPS and margins. All amounts are TWD (converted from the exchanges' thousands). The income statement is year-to-date (cumulative from January through the reported quarter), as filed in Taiwan. P/E uses the latest four quarters of EPS, which can lag the income statement (see earnings_period); dividend yield uses the latest annual dividend (see dividend_year and dividend_per_share). Yields above 20% are flagged in warnings because they usually reflect a one-off distribution. ETFs and some securities have no fundamentals; such inputs are listed in unresolved. Sources: TWSE / TPEx OpenAPI, refreshed daily (valuation) to monthly/quarterly (revenue, financials).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbols": "<symbols>"
    },
    "name": "get_fundamentals"
  }
}

Input Schema

NameRequiredDescriptionDefault
marketNoOmit to detect automatically.
symbolsYesCodes or exact names, e.g. ["2330", "鴻海"]. Up to 20.

Output Schema

NameRequiredDescriptionDefault
warningsYes
companiesYes
unresolvedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, the description discloses currency normalization (TWD, converted from exchange thousands), the year-to-date nature of the income statement, the four-quarter EPS basis for P/E and its potential lag relative to the income statement, the annual-dividend basis for yield, warnings for yields above 20%, and the daily-to-quarterly refresh cadence per source.

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 paragraph is dense but front-loaded with the core purpose, followed by the caveats an agent needs (currency, YTD, lagging P/E, unresolved symbols, refresh cadence). Nearly every sentence carries operational value; the source/refresh sentence is the only one that could be trimmed.

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?

With an output schema present, return values need not be re-explained, and the tool is fully specified for its complexity: what data is returned, in what currency, how derived metrics are computed, what symbols produce no data, and how fresh it is.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with `symbols` and `market` fully described including the auto-detect behavior, so the baseline is 3. The description adds a little framing (TWSE/TPEx mapping to the market enum, codes or exact names) but nothing about parameter syntax or limits beyond the 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 names a specific resource (latest fundamentals for TWSE/TPEx-listed companies) and enumerates the payload: valuation ratios, monthly revenue with MoM/YoY, and quarterly income statement with EPS/margins. It never explicitly contrasts itself with the overlapping sibling get_stock_overview or get_quote, so an agent must infer the boundary, but the content scope is unambiguous.

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?

Usage is implied rather than stated: the description establishes what data you get and notes ETFs/some securities return nothing (listed in `unresolved`), which is a useful exclusion. There is no explicit 'use this when you need X instead of get_quote/get_stock_overview' routing, so sibling selection is left to inference.

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