list_service_areasList all available transit service areas in Malaysia (e.g., Klang Valley, Penang, Kuantan)
detect_location_area1 paramAutomatically detect which transit service area a location belongs to using geocoding. Use this when the user mentions a place name witho…
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.
| Parameter | Type | Description |
|---|
location | string | Location name or place (e.g., "KTM Alor Setar", "Komtar", "Pavilion KL") |
get_area_info1 paramGet detailed information about a specific transit service area
| Parameter | Type | Description |
|---|
areaId | string | Service area ID (e.g., "penang", "klang-valley", "kuantan") |
search_stops2 paramsSearch for bus or train stops by name in a specific area. The middleware will automatically geocode place names (like "Ideal Foresta") an…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley"). Use detect_location_area if unsure. |
query | string | Search query - can be a stop name (e.g., "Komtar") OR a place name (e.g., "Ideal Foresta"). Place names will be auto-geocoded to find nearby stops. |
get_stop_details2 paramsGet detailed information about a specific bus or train stop
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
stopId | string | Stop ID from search results |
get_stop_arrivals2 paramsGet real-time arrival predictions for buses/trains at a specific stop
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
stopId | string | Stop ID from search results |
find_nearby_stops5 paramsFind bus or train stops near a specific location AND get all routes serving those stops. You can provide EITHER coordinates (lat/lon) OR …
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.
| Parameter | Type | Description |
|---|
lat | number | Latitude coordinate (optional if location is provided) |
lon | number | Longitude coordinate (optional if location is provided) |
area | string | Service area ID (e.g., "penang", "klang-valley") |
radius | number | Search radius in meters (default: 500) |
location | string | Place name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar"). Use this instead of lat/lon for convenience. |
find_nearby_stops_with_arrivals6 paramsFind bus stops near a location AND get real-time arrival predictions in one call. RECOMMENDED: Use this tool when users ask about nearby …
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.
| Parameter | Type | Description |
|---|
lat | number | Latitude coordinate (optional if location is provided) |
lon | number | Longitude coordinate (optional if location is provided) |
area | string | Service area ID (e.g., "penang", "klang-valley") |
radius | number | Search radius in meters (default: 500) |
location | string | Place name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar") |
routeFilter | string | Filter arrivals by route number (e.g., "302", "101") |
find_nearby_stops_with_routes5 paramsFind bus stops near a location AND get all routes serving those stops in one call. Accepts a place name (e.g., "Ideal Foresta") - the mid…
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.
| Parameter | Type | Description |
|---|
lat | number | Latitude coordinate (optional if location is provided) |
lon | number | Longitude coordinate (optional if location is provided) |
area | string | Service area ID (e.g., "penang", "klang-valley") |
radius | number | Search radius in meters (default: 500) |
location | string | Place name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar") |
list_routes1 paramList all available bus or train routes in a specific area
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
get_route_stops2 paramsGet 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 co…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
routeId | string | Route ID from list_routes (e.g., "302", "101") |
get_route_details2 paramsGet detailed information about a specific route including stops and geometry. IMPORTANT: First call list_routes to get the correct route_id.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
routeId | string | Route ID from list_routes (e.g., "302", "101") |
get_route_geometry2 paramsGet the geographic path and stops for a specific route (for map visualization)
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
routeId | string | Route ID from list_routes |
get_live_vehicles2 paramsGet real-time positions of all buses and trains in a specific area
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
type | string | Filter by transit type (optional) |
get_provider_status1 paramCheck the operational status of transit providers in a specific area
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley") |
get_route_departures3 paramsGet the next N departures for a specific route (both directions). Useful for showing upcoming bus/train times. IMPORTANT: Use route_short…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
count | number | Number of departures to return (default: 5) |
routeId | string | Route SHORT NAME (e.g., "101", "K10", "A32") - NOT the numeric route_id. Get this from list_routes route_short_name field. |
get_next_departure3 paramsGet the single next departure for a route in a specific direction. Quick way to find when the next bus/train leaves. IMPORTANT: Use route…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
routeId | string | Route SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id |
direction | string | Direction of travel (optional) |
get_stop_routes3 paramsGet all routes serving a specific stop with their next departures. Shows which buses/trains stop here and when. Works for: penang, ipoh, …
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
count | number | Number of departures per route (default: 3) |
stopId | string | Stop ID from search_stops |
get_route_schedule2 paramsGet the complete daily schedule for a route. Shows all departure times throughout the day. IMPORTANT: Use route_short_name (e.g., "101", …
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
routeId | string | Route SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id |
get_route_origin3 paramsGet the origin stop name for a route in a specific direction. Useful for showing where the bus/train starts. IMPORTANT: Use route_short_n…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
routeId | string | Route SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id |
direction | string | Direction of travel (optional) |
get_route_status2 paramsCheck if a route is currently operating based on its schedule. Shows if buses/trains are running now. IMPORTANT: Use route_short_name (e.…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh", "seremban", "alor-setar") |
routeId | string | Route SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id |
get_fare_routes1 paramGet all routes available for fare calculation in a specific area. MUST call this FIRST before calculate_fare to get valid route_id values…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID - must be: ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching, or penang |
get_route_stops_for_fare2 paramsGet all stops on a route with their distances for fare calculation. MUST call this SECOND (after get_fare_routes) to get valid stop_id va…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID - same as used in get_fare_routes |
routeId | string | The route_id value from get_fare_routes response (e.g., "D62", "A32", "M15CWLMYMK") |
calculate_fare4 paramsCalculate 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…
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.
| Parameter | Type | Description |
|---|
area | string | Service area ID - same as used in previous calls |
toStop | string | The exact stop_id from get_route_stops_for_fare response |
routeId | string | The exact route_id from get_fare_routes (NOT route_short_name) |
fromStop | string | The exact stop_id from get_route_stops_for_fare response |
calculate_journey_fare2 paramsCalculate the total fare for a multi-leg journey with bus transfers. Each leg is a separate fare since BAS.MY does not have integrated tr…
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.
| Parameter | Type | Description |
|---|
area | string | Base service area ID (legs can specify different areas for inter-area journeys) |
legs | array | Array of journey legs (max 5) |
get_route_directions_for_fare2 paramsGet available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) to use for fare cal…
Get available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) to use for fare calculation.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "ipoh") |
routeId | string | Route ID from get_fare_routes |
get_ktm_komuter_stationsGet all 23 KTM Komuter Utara stations (Padang Besar - Butterworth - Ipoh line). Returns station codes, names, and coordinates.
calculate_ktm_komuter_fare2 paramsCalculate KTM Komuter Utara fare between two stations. Use station codes (e.g., "BU" for Butterworth, "IP" for Ipoh, "PB" for Padang Besar).
| Parameter | Type | Description |
|---|
to | string | Destination station code (e.g., "BU", "IP", "PB") |
from | string | Origin station code (e.g., "BU", "IP", "PB") |
get_ktm_komuter_fare_matrixGet the full KTM Komuter Utara fare matrix showing fares between all station pairs.
get_ktm_station_departures2 paramsGet departure times for a specific KTM station. Supports both KTM Komuter Utara and KTM Intercity schedules.
| Parameter | Type | Description |
|---|
type | string | Schedule type: ktm-komuter-utara (Padang Besar-Ipoh) or ktm-intercity (SH/ERT routes) |
stationName | string | Station name (e.g., "Butterworth", "Ipoh", "Padang Besar", "Gemas") |
get_ktm_stations1 paramGet all KTM stations for a specific schedule type (Komuter Utara or Intercity).
| Parameter | Type | Description |
|---|
type | string | Schedule type: ktm-komuter-utara or ktm-intercity |
get_ktm_schedules1 paramGet full KTM schedule data for a specific schedule type. Returns complete timetable information.
| Parameter | Type | Description |
|---|
type | string | Schedule type: ktm-komuter-utara or ktm-intercity |
find_nearby_ktm_stations5 paramsFind KTM stations near a specific location. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode…
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.
| Parameter | Type | Description |
|---|
lat | number | Latitude coordinate (optional if location is provided) |
lon | number | Longitude coordinate (optional if location is provided) |
type | string | Schedule type: ktm-komuter-utara or ktm-intercity |
radius | number | Search radius in kilometers (default: 10) |
location | string | Place name to geocode (e.g., "Butterworth", "Ipoh", "Padang Besar"). Use this instead of lat/lon for convenience. |
get_penang_ferry_overviewGet Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry operates between Bu…
Get Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry operates between Butterworth and George Town.
get_penang_ferry_schedule2 paramsGet full Penang Ferry schedule with departure times. Supports filtering by direction and day type.
| Parameter | Type | Description |
|---|
day | string | Filter by day type (optional) |
direction | string | Filter by direction (optional) |
get_penang_ferry_next_departureGet next ferry departures from both Butterworth and George Town terminals in real-time. Shows minutes until departure.
get_penang_ferry_terminalsGet detailed information about Penang Ferry terminals including facilities, connections, parking, and nearby attractions.
get_penang_ferry_fareGet Penang Ferry fare information, payment methods, and terminal coordinates.
get_system_healthCheck the health status of the Malaysia Transit middleware service
get_debug_infoGet comprehensive debug information about the middleware service including memory usage and initialized areas
get_api_analytics1 paramGet API usage analytics and statistics from the middleware. Shows total requests, requests per hour, error rates, and usage by service ar…
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.
| Parameter | Type | Description |
|---|
type | string | Type of analytics: summary (overview), endpoints (per-endpoint stats), areas (per-area stats), cumulative (all-time totals), clients (app/website usage) |
get_area_analytics1 paramGet detailed API usage analytics for a specific service area. Shows which endpoints are most used for that area.
| Parameter | Type | Description |
|---|
area | string | Service area ID (e.g., "penang", "klang-valley", "ipoh") |
helloA simple test tool to verify that the MCP server is working correctly