Get the nearest approaching bus on a line
bus_list_line_busesGet the imminent bus for a specified stop on a bus line, returning its ETA and next stop name for quick arrival checks.
Instructions
Returns the nearest bus heading to the anchor stop, with ETA and the bus's next stop name.
This is narrower than the name suggests. Despite the upstream endpoint being called "busList", in practice it returns at most 1-2 buses (the imminent ones). For the FULL roster of every bus currently on the line, call bus_get_line_detail — its 'buses' array lists all live vehicles with positions.
Use this tool when you want a quick "what's about to arrive" answer for a specific stop.
Args:
city_id (string, required)
line_id (string, required)
target_order (string, required): the waiting stop's order on the line
station_name (string, required): display name of that anchor stop
response_format ('markdown' | 'json')
Returns (json): { "targetOrder": 2, "buses": [ { "busId":"...", "licence":"...", "order":2, "lat":..., "lng":..., "speed":8.2, "capacity":0, "nextStop":"西藏中路", "eta":{"travelTime":214,"arrivalTime":..., "displayTime":"10:14"} } ] }
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": {
"city_id": "<city_id>",
"line_id": "<line_id>",
"target_order": "<target_order>",
"station_name": "<station_name>"
},
"name": "bus_list_line_buses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city_id | Yes | ||
| line_id | Yes | ||
| station_name | Yes | Display name of the target stop | |
| target_order | Yes | ||
| response_format | No | Output format: 'markdown' for human-readable text, 'json' for full structured data | markdown |