Skip to content

v0.5.0 — Metro cross-line transfer routing

Choose a tag to compare

@kiki830621 kiki830621 released this 31 May 12:40

v0.5.0 — Metro cross-line transfer routing

metro_find_route now does cross-line transfer routing, not just direct (#6). The metro network is modelled as a graph (stations as nodes; same-line adjacency from S2STravelTime; transfer edges from the new LineTransfer dataset, weighted by walk time + estimated boarding wait) and the shortest path is returned. A direct route is simply a zero-transfer path — so the same query also catches cases where a 環狀線 transfer beats a long direct ride.

Added

  • Cross-line transfer routing in metro_find_route. New metroLineTransfer registry endpoint + MetroLineTransfer model + contract case (contract cases 30 → 31). Single-line systems (HTTP 400 / empty) degrade gracefully to no transfer edges. Tool count unchanged (22 — extends the existing tool).

Changed

  • metro_find_route output shape evolved from v0.4.0's flat single-line shape to routes[], each with legs[] (one leg per line ridden — line name/colour, per-leg travel time, headway), transfers[] (one per line change — interchange station, from/to line, walk_min, estimated wait_min), transfer_count, and total travel_time_min. The #5 direct short-circuit gate is replaced by always building the graph.

Verification

  • 135 offline tests green (incl. MetroGraphTests: shortest path, circular-shortcut-beats-direct, single-line graceful, unreachable).
  • Live: metro_find_route(臺北車站 → 淡水, TRTC) → 1 transfer at 台北車站 (BL→R, walk 4 + wait 4) + 淡水信義線 ride → 45 min. metro_find_route(臺北車站 → 南港, TRTC)0-transfer 板南線, 19 min.
  • metro endpoints (incl. LineTransfer) live-contract green.

Install

Download che-transport-mcp-0.5.0.mcpb for one-click install in Claude Desktop. Developer ID signed + Apple notarized.