Skip to main content
Glama

Taiwan Market Open Data (Unofficial)

Look up stock code

quote.lookup
Read-onlyIdempotent

Find the code of a TWSE-listed company or fund (including ETFs) from its name or code, e.g. 台積電 → 2330. Use it first when the user gives only a name. English matching covers the exchange's English short names (TSMC, UMC, MediaTek) and fund English names, not full company names; if an English name finds nothing, try its short form or the Chinese name. Listed (TWSE) securities only. Source: TWSE OpenAPI. 用名稱或代號找上市公司與上市基金(含 ETF)的代號。使用者只講名稱(「台積電」「元大高股息」)時先用這個取得代號,不要憑印象猜代號。比對公司簡稱、全名、英文簡稱與代號,不分全半形與台/臺。只收上市標的;上櫃公司的名稱對照取不到。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo最多回傳幾筆(預設 10,上限 50)。
queryYes名稱或代號,例如 "台積電"、"TSMC"、"高股息"、"2330"。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
sourceYes
caveatsYes
resultsYes
total_matchedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), and the description goes well beyond them: matching semantics (English short names and fund names only, not full legal names), normalization rules (全半形, 台/臺), coverage limits (TWSE listed only, no OTC), and the data source. That is exactly the extra behavioral context an agent needs.

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?

Front-loads purpose, example, and the 'use first' rule before the caveats. The main cost is the fully bilingual duplication, where the Chinese text largely restates the English, making it longer than strictly necessary without adding new facts.

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?

An output schema exists, so return values need no explanation, and the description covers the non-obvious risks: partial English matching, missing full company names, and the OTC blind spot. Nothing an agent needs to call this correctly is missing.

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 description coverage is 100%, so both parameters are already documented in the schema with examples and the limit bounds (1–50, default 10). The description adds matching behavior around `query` but nothing about `limit`. Baseline 3 is appropriate.

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?

States a specific verb+resource (find the code of a TWSE-listed company or fund from name or code), gives a concrete example (台積電 → 2330), and scopes it tightly to listed securities including ETFs. It is immediately distinguishable from sibling tools like quote.realtime or snapshot.etf, which return prices rather than identifiers.

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?

Explicitly says to use it first when the user supplies only a name, and warns against guessing codes, plus a fallback path when an English name fails. It does not name a sibling alternative for the reverse case (code → data), so routing guidance is strong but not fully exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.