Skip to main content
Glama
tw-stock-mcp

tw-stock-mcp

by jiawei-hong

Get market and corporate events

get_market_events
Read-onlyIdempotent

Query upcoming and recent TWSE/TPEx market events—holidays, ex-dividend/rights dates, disposition and attention notices, and trading halts—by symbols, event type, and date window.

Instructions

Upcoming and recent events on TWSE and TPEx: market holidays (休市), ex-dividend / ex-rights dates (除權息) with cash dividend per share, disposition stocks under restricted trading (處置股), attention notices for unusual trading (注意股), and trading halts (暫停交易). Filter by symbols, kinds and a date window; events whose period overlaps the window are included. Default window: 14 days ago to 45 days ahead; giving only start or end keeps the other default. Each exchange dataset covers only a limited period, reported in coverage per kind and market: attention notices are for the latest trading day only, dispositions are recent announcements, ex-dividend schedules run a few weeks ahead, and holidays cover only the calendar year TWSE currently publishes. No event outside a dataset's from/to range means no data, not that nothing happened.

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

Input Schema

NameRequiredDescriptionDefault
endNoWindow end, YYYY-MM-DD.
kindsNoDefault: all of ["holiday","dividend","disposition","attention","halt"].
limitNoMaximum events (default 100).
startNoWindow start, YYYY-MM-DD.
marketNoOmit for both markets.
symbolsNoOnly events for these codes or exact names. Holidays are always included unless excluded via kinds.

Output Schema

NameRequiredDescriptionDefault
endYes
startYes
totalYes
eventsYes
coverageYesPer dataset: what it keeps (scope) and the event dates it actually contained (from/to, null when empty).
warningsYes
truncatedYes
unresolvedYes

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/idempotent annotations by disclosing per-kind, per-market dataset coverage limits (attention notices only latest trading day, dispositions recent announcements, dividends a few weeks ahead, holidays current calendar year). Most valuably it warns that an empty result outside a dataset's from/to range means no data rather than no event — a nuance an agent could not 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 the event-type inventory and exchange scope before the filtering and coverage details, which matches how an agent scans. The coverage sentence is long and packs several clauses, but each carries distinct, non-redundant information; only minor tightening is possible.

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 and the description references the `coverage` field it returns, so return values needn't be re-explained. Combined with default-window rules, overlap semantics, and dataset-range caveats, an agent has everything needed to call this correctly and interpret sparse results.

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: the window is an overlap test ('events whose period overlaps the window'), the default window dates, and that a lone `start` or `end` keeps the other default. It also clarifies that symbols accepts codes or exact names and that holidays are included regardless — none of which the schema states.

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?

Names a specific verb+resource (upcoming and recent events) and enumerates the exact event types covered (holidays, ex-dividend/ex-rights, dispositions, attention notices, halts) on named exchanges (TWSE/TPEx). This clearly separates it from sibling tools like get_market_index or get_market_overview, which deal with prices and indices rather than event calendars.

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?

Explains how to scope results via `symbols`, `kinds` and a date window, and states the default window (14 days back to 45 days ahead) plus the behavior when only one bound is supplied. It doesn't explicitly name a sibling tool as an alternative or state exclusions, so it falls short of a 5, but the context for when to reach for it is clear.

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