name: kmb-bus-arrival
description: Retrieve real-time KMB bus arrival information. getNextArrivals returns plain text; other tools return JSON.
version: 1.2.1
author: Steven Ho
repository: https://github.com/StevenHo1394/kmb-bus-arrival
tools:
description: List available travel directions for a KMB route. Returns JSON.
command: python3 kmb_bus.py getRouteDirection {route}
inputSchema:
type: object
required: [route]
properties:
route:
type: string
output:
format: json
description: Get the list of stops for a route with sequence numbers. Returns JSON.
command: python3 kmb_bus.py getRouteInfo {route} {direction}
inputSchema:
type: object
required: [route, direction]
properties:
route:
type: string
direction:
type: string
enum: ["outbound", "inbound"]
output:
format: json
description: Find bus stop ID(s) by name (Chinese or English). Returns JSON.
command: python3 kmb_bus.py getBusStopID {name}
inputSchema:
type: object
required: [name]
properties:
name:
type: string
output:
format: json
description: Get the next bus arrival times for a specific route/direction/stop. Returns plain text.
command: python3 kmb_bus.py getNextArrivals {route} {direction} {stopId}
inputSchema:
type: object
required: [route, direction, stopId]
properties:
route:
type: string
direction:
type: string
enum: ["outbound", "inbound", "auto"]
stopId:
type: string
output:
format: text
Implementation:
```
Route (To Destination)
Stop: Human Readable Stop Name
Next arrivals:
```
If direction="auto" and the stop is served in both directions, multiple blocks are printed.
error field.version: 1.2.1
changes:
共 5 个版本