get_vehicle_positions
Retrieve live GPS locations of vehicles on a chosen TfNSW mode. Use it to see exactly where buses, trains, ferries, or light rail are right now.
Instructions
Fetch live GPS positions of vehicles currently running on a network.
Unlike the other tools, which return timing estimates, this returns where
each vehicle physically is. Note this feed is a separate product on the
TfNSW Open Data portal — your API key must be subscribed to it as well.
Feeds can carry thousands of vehicles, so results are capped: `count` is the
true feed size and `returned` is how many are included.
Args:
mode: Which feed to read. One of "buses", "sydneytrains", "metro",
"nswtrains", "ferries/sydneyferries", "lightrail/cbdandsoutheast",
"lightrail/innerwest", "lightrail/newcastle",
"lightrail/parramatta".
max_results: Maximum vehicles to return.
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": {
"mode": "<mode>"
},
"name": "get_vehicle_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||