Skip to main content
Glama
tw-stock-mcp

tw-stock-mcp

by jiawei-hong

Get realtime Taiwan market indices

get_market_index
Read-only

Retrieve near-realtime Taiwan headline index values (TAIEX, TPEX, FRMSA), including change, open/high/low, and optional intraday TAIEX/TPEX series for the current or last session.

Instructions

Near-realtime values of Taiwan's headline indices: TAIEX (發行量加權股價指數, TWSE), TPEX (櫃買指數) and FRMSA (寶島股價指數). Returns value, previous close, change, change percent and the day's open/high/low. Set intraday for a sampled minute-by-minute series of TAIEX and TPEX for the current or last session. Outside trading hours (09:00-13:30 Taipei) it returns the last session with status "previous_session".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_market_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
pointsNoIntraday points to return per index (default 28, about every 10 minutes).
indicesNoDefault ["TAIEX", "TPEX"].
intradayNoInclude an intraday series (TAIEX and TPEX only).

Output Schema

NameRequiredDescriptionDefault
indicesYes
retrieved_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the readOnly/openWorld annotations, the description discloses important behavior: the 09:00-13:30 Taipei trading window, the fallback to the last session, and the `previous_session` status marker. It does not cover rate limits, caching, or data-source latency beyond 'near-realtime'.

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?

Three front-loaded sentences with no filler: coverage first, return fields second, edge-case behavior last. The parenthetical Chinese index names are justified for disambiguation rather than padding.

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?

The tool has an output schema and full annotation coverage, so the description need not explain return shapes or safety it already states. It is nearly complete for a three-optional-parameter read tool, with only an explicit sibling comparison 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 coverage is 100%, so the baseline is 3. The description adds only marginal meaning beyond the schema, notably that `intraday` covers TAIEX and TPEX only and can reflect the current or last session; `points` and `indices` are left to the schema's own descriptions.

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 names a specific verb and resource (near-realtime values of Taiwan's headline indices) and enumerates the exact indices covered (TAIEX, TPEX, FRMSA), which cleanly distinguishes it from single-security siblings like get_quote and search_security.

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?

It gives behavioral context for the `intraday` flag and explains the outside-trading-hours case, but never states when to choose this tool over get_market_overview, get_market_movers, or get_quote. Usage is implied by scope rather than explicitly guided.

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