list_service_areas
List all available transit service areas in Malaysia (e.g., Klang Valley, Penang, Kuantan)
detect_location_area
Automatically detect which transit service area a location belongs to using geocoding. Use this when the user mentions a place name without specifying the area (e.g., "KTM Alor Setar", "Komtar", "KLCC"). IMPORTANT: After detecting the area, use find_nearby_stops_with_arrivals or find_nearby_stops with the location parameter - these tools handle geocoding automatically and are more reliable than using coordinates from this tool.
get_area_info
Get detailed information about a specific transit service area
search_stops
Search for bus or train stops by name in a specific area. The middleware will automatically geocode place names (like "Ideal Foresta") and find nearby stops if no exact stop name match is found. IMPORTANT: If you are unsure which area a location belongs to, use detect_location_area first to automatically determine the correct area.
get_stop_details
Get detailed information about a specific bus or train stop
get_stop_arrivals
Get real-time arrival predictions for buses/trains at a specific stop
find_nearby_stops
Find bus or train stops near a specific location AND get all routes serving those stops. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode place names automatically.
find_nearby_stops_with_arrivals
Find bus stops near a location AND get real-time arrival predictions in one call. RECOMMENDED: Use this tool when users ask about nearby bus stops and arrival times together. Accepts a place name (e.g., "Ideal Foresta") - the middleware handles geocoding automatically.
find_nearby_stops_with_routes
Find bus stops near a location AND get all routes serving those stops in one call. Accepts a place name (e.g., "Ideal Foresta") - the middleware handles geocoding automatically.
list_routes
List all available bus or train routes in a specific area
get_route_stops
Get all stops on a specific route. Use this to find which stops a bus/train route serves. IMPORTANT: First call list_routes to get the correct route_id.
get_route_details
Get detailed information about a specific route including stops and geometry. IMPORTANT: First call list_routes to get the correct route_id.
get_route_geometry
Get the geographic path and stops for a specific route (for map visualization)
get_live_vehicles
Get real-time positions of all buses and trains in a specific area
get_provider_status
Check the operational status of transit providers in a specific area
get_route_departures
Get the next N departures for a specific route (both directions). Useful for showing upcoming bus/train times. IMPORTANT: Use route_short_name (e.g., "K10", "A32", "R10", "101") NOT the numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_next_departure
Get the single next departure for a route in a specific direction. Quick way to find when the next bus/train leaves. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_stop_routes
Get all routes serving a specific stop with their next departures. Shows which buses/trains stop here and when. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_route_schedule
Get the complete daily schedule for a route. Shows all departure times throughout the day. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_route_origin
Get the origin stop name for a route in a specific direction. Useful for showing where the bus/train starts. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_route_status
Check if a route is currently operating based on its schedule. Shows if buses/trains are running now. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.
get_fare_routes
Get all routes available for fare calculation in a specific area. MUST call this FIRST before calculate_fare to get valid route_id values. Supports: ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching, penang.
get_route_stops_for_fare
Get all stops on a route with their distances for fare calculation. MUST call this SECOND (after get_fare_routes) to get valid stop_id values for calculate_fare. Returns stop IDs and names.
calculate_fare
Calculate the bus fare between two stops on a route. IMPORTANT: You MUST first call get_fare_routes to get route_id, then get_route_stops_for_fare to get valid stop_id values. Do NOT guess IDs.
calculate_journey_fare
Calculate the total fare for a multi-leg journey with bus transfers. Each leg is a separate fare since BAS.MY does not have integrated transfers.
get_route_directions_for_fare
Get available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) to use for fare calculation.
get_ktm_komuter_stations
Get all 23 KTM Komuter Utara stations (Padang Besar - Butterworth - Ipoh line). Returns station codes, names, and coordinates.
calculate_ktm_komuter_fare
Calculate KTM Komuter Utara fare between two stations. Use station codes (e.g., "BU" for Butterworth, "IP" for Ipoh, "PB" for Padang Besar).
get_ktm_komuter_fare_matrix
Get the full KTM Komuter Utara fare matrix showing fares between all station pairs.
get_ktm_station_departures
Get departure times for a specific KTM station. Supports both KTM Komuter Utara and KTM Intercity schedules.
get_ktm_stations
Get all KTM stations for a specific schedule type (Komuter Utara or Intercity).
get_ktm_schedules
Get full KTM schedule data for a specific schedule type. Returns complete timetable information.
find_nearby_ktm_stations
Find KTM stations near a specific location. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode place names automatically.
get_penang_ferry_overview
Get Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry operates between Butterworth and George Town.
get_penang_ferry_schedule
Get full Penang Ferry schedule with departure times. Supports filtering by direction and day type.
get_penang_ferry_next_departure
Get next ferry departures from both Butterworth and George Town terminals in real-time. Shows minutes until departure.
get_penang_ferry_terminals
Get detailed information about Penang Ferry terminals including facilities, connections, parking, and nearby attractions.
get_penang_ferry_fare
Get Penang Ferry fare information, payment methods, and terminal coordinates.
get_system_health
Check the health status of the Malaysia Transit middleware service
get_debug_info
Get comprehensive debug information about the middleware service including memory usage and initialized areas
get_api_analytics
Get API usage analytics and statistics from the middleware. Shows total requests, requests per hour, error rates, and usage by service area. Useful for monitoring API health and usage patterns.
get_area_analytics
Get detailed API usage analytics for a specific service area. Shows which endpoints are most used for that area.
hello
A simple test tool to verify that the MCP server is working correctly