Skip to main content
Glama

Taiwan Transit

Get train timetables and fares

get_train_timetable
Read-onlyIdempotent

Taiwan High Speed Rail and Taiwan Railway trains between two stations on a date, with departure and arrival times, travel time, fares and, for Taiwan Railway, each train's on-time rate and average delay over the past 30 days. Data comes from CubeLV's Taiwan open data service (https://cubelv.com/en/mcp/taiwan-transit/): each call names a method and passes its arguments in args.

Methods:

  • railTimetable (Taiwan high speed rail and railway timetable): Trains between two stations of Taiwan High Speed Rail or Taiwan Railway on one day, with departure, arrival, travel time and adult one-way fare. High speed rail trains add fares for standard, business and non-reserved cars and, for today, remaining seats. Railway trains add the train class and an on-time rate and average delay over the past 30 days. Args: system (required): thsr for Taiwan High Speed Rail or tra for Taiwan Railway.; from (required): Departure station name or ID, in any supported language.; to (required): Arrival station name or ID, in any supported language.; date: Travel date YYYYMMDD, Taipei time; defaults to today. Timetables are published about a month ahead.; departAfter: Only trains departing at or after this time, HH:MM.; limit: Maximum number of trains, 1 to 200; default 20..

  • railFares (Taiwan high speed rail and railway fares): All fares between two stations of Taiwan High Speed Rail or Taiwan Railway by ticket type, passenger class and car class (high speed rail) or train class (railway), plus a short list of adult one-way fares. Railway results include the distance in km. Prices are in TWD. Args: system (required): thsr for Taiwan High Speed Rail or tra for Taiwan Railway.; from (required): Departure station name or ID, in any supported language.; to (required): Arrival station name or ID, in any supported language..

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": {
      "method": "<method>"
    },
    "name": "get_train_timetable"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoArguments of the method, as listed in the tool description
langNoLanguage for data labels (industries, statement items, categories) and links: en, ja, ko or vi; default en
methodYesMethod from the list in the tool description
offsetNoPosition in the longest list of the response to start from. A response whose list is longer than fits carries page.nextOffset for the next part; default 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered. The description adds genuinely useful context beyond them: data provenance (CubeLV Taiwan open data service), freshness constraints (timetables published about a month ahead; on-time rate and average delay computed over the past 30 days), currency (TWD), and same-day seat availability for THSR. It does not discuss rate limits, error behavior, or auth, keeping it short of a 5.

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 method list with per-method args is well structured and front-loads the summary before the details. There is some waste: the opening paragraph largely restates the railTimetable entry, and the args are rendered as run-on semicolon fragments with stray trailing periods, which slightly hurts scannability in an otherwise long description.

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?

With no output schema, the description does the work of describing returns: times, travel time, fares by car/train class, remaining seats, on-time rate, distance in km, and TWD pricing, plus paging via offset/page.nextOffset in the schema. What is missing is guidance on station identification (names vs IDs across languages) and any statement about errors or empty results for dates beyond the publication horizon.

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

Parameters5/5

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

Although top-level schema coverage is 100%, the critical args object is free-form (additionalProperties: true) and its contents are documented only in the description. The description carries that burden fully: it marks system/from/to as required, gives accepted enum values (thsr/tra), date format YYYYMMDD in Taipei time with a today default, departAfter as HH:MM, and limit range 1–200 with default 20. This is exactly the meaning the schema cannot supply.

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 and scope: THSR and TRA trains between two stations on a given date, returning departure/arrival times, travel time and fares. It also enumerates the two underlying methods (railTimetable, railFares) so the agent knows exactly what data shapes are available. It does not differentiate against siblings such as get_train_delays, even though delay statistics are also returned here, leaving a mild overlap unaddressed.

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 through method selection: choose railTimetable for schedules/times and railFares for fare tables by ticket/passenger/car class. There is no explicit when-not-to-use guidance, no statement about when to prefer get_train_delays for delay-focused queries, and no mention that station names can be resolved via find_stations. The agent must infer routing from the method list alone.

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.

Resources