Skip to main content
Glama
tw-stock-mcp

tw-stock-mcp

by jiawei-hong

Get realtime Taiwan stock quotes

get_quote
Read-only

Fetch near-realtime Taiwan stock and ETF quotes by code or exact Chinese name, with automatic TWSE/TPEx market detection and unresolved-symbol suggestions.

Instructions

Near-realtime quotes for Taiwan stocks and ETFs from TWSE MIS, covering both TWSE (上市) and TPEx (上櫃). Accepts codes ("2330", "2330.TW", "6488.TWO") or exact Traditional Chinese names ("台積電"); the market is detected automatically. Prices are TWD. volume is the day's accumulated volume in lots (1 lot = 1,000 shares), or shares when odd_lot is true, for the regular session only: end-of-day tools such as get_history report the exchange's daily total, which also includes odd-lot, after-hours fixed-price and other trades, so it is usually a few percent higher. price is null when there has been no trade yet; check status and the best bid/ask instead. Inputs that cannot be resolved are listed in unresolved with suggestions rather than failing the whole call. Outside trading hours (09:00-13:30 Asia/Taipei, weekdays) the last session's values are returned with status "previous_session".

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_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
marketNoOnly query one market. Omit to auto-detect (recommended).
odd_lotNoReturn odd-lot (零股) quotes instead of regular board lots.
symbolsYesCodes or exact names, e.g. ["2330", "0050", "鴻海"]. Up to 50.

Output Schema

NameRequiredDescriptionDefault
quotesYes
warningsYes
unresolvedYes
retrieved_atYesISO 8601 timestamp of this call

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses the upstream source, that the market is auto-detected, that prices are TWD, that volume is in lots (or shares under odd_lot) and covers the regular session only, that price is null before first trade (with a suggested fallback to status and bid/ask), and that unresolvable inputs land in `unresolved` instead of failing the call. That partial-failure behavior and the session-coverage caveat are exactly the traits an agent cannot infer from structured fields.

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 what the tool is and what it accepts before the caveats, and every sentence carries substantive information. The volume-versus-daily-total passage is dense and, while valuable, could be tightened without losing meaning.

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 three-parameter read tool with an output schema and full annotation coverage, this covers all the decision-relevant unknowns: accepted input forms, session timing, unit conventions, null-price handling, and partial-failure resolution. Nothing an agent needs in order to call it correctly or interpret the response is missing.

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 100%, so the baseline is 3, but the description adds real meaning: accepted symbol formats ("2330", "2330.TW", "6488.TWO", or exact Traditional Chinese names like "台積電"), automatic market detection, and the fact that odd_lot changes the unit of `volume` from lots to shares. Those additions go beyond the schema's field descriptions rather than restating them.

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 and resource (near-realtime quotes for Taiwan stocks and ETFs), names the data source (TWSE MIS), and covers both TWSE and TPEx markets. The scope is precise enough that an agent can distinguish it from get_history without opening either schema.

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?

Contrasts itself with end-of-day tools such as get_history via the volume-semantics difference, and explains the outside-trading-hours fallback (status "previous_session"), which tells the agent when the returned data is not live. It stops short of an explicit 'use X when you need realtime, Y when you need history' routing sentence, so the choice is implied rather than stated.

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