Skip to content

Commit d6da128

Browse files
CopilotabeckDev
andcommitted
Update README with FindTrainConnections documentation
Co-authored-by: abeckDev <8720854+abeckDev@users.noreply.github.com>
1 parent 04641b2 commit d6da128

1 file changed

Lines changed: 68 additions & 1 deletion

File tree

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ Once the server is running, you can test it using the MCP Inspector:
438438

439439
1. **List Available Tools**:
440440
- In the MCP Inspector, click "List Tools" to see all available MCP tools
441-
- You should see: `GetStationBoard`, `GetStationChanges`, `GetFullTimetableChanges`, `GetStationDetails`
441+
- You should see: `GetStationBoard`, `GetStationChanges`, `GetFullTimetableChanges`, `GetStationDetails`, `FindTrainConnections`
442442

443443
2. **Test GetStationDetails**:
444444
- Select the `GetStationDetails` tool
@@ -463,6 +463,7 @@ To integrate this MCP server with AI agents or client applications:
463463
- `GetStationChanges`: Get recent changes (delays, cancellations)
464464
- `GetFullTimetableChanges`: Get all timetable changes for an event
465465
- `GetStationDetails`: Search for station information
466+
- `FindTrainConnections`: Find and assess train connections between two stations with delay information
466467

467468
For production deployments, consider:
468469
- Using HTTPS with proper SSL certificates
@@ -666,6 +667,72 @@ The server exposes the following MCP tools for AI agents to interact with Deutsc
666667
}
667668
```
668669

670+
### 5. FindTrainConnections
671+
672+
**Description**: Find and assess train connections between two stations. This comprehensive tool validates station names, finds all trains operating between the stations, checks for current delays and disruptions, and provides ranked connection options with recommendations.
673+
674+
**Parameters**:
675+
- `stationA` (required): Starting station name or EVA number (e.g., `"Frankfurt Hbf"` or `"8000105"`)
676+
- `stationB` (required): Destination station name or EVA number (e.g., `"Berlin Hbf"` or `"8011160"`)
677+
- `dateTime` (optional): Date and time in format `yyyy-MM-dd HH:mm` (UTC). Leave empty for current time.
678+
679+
**Returns**: A comprehensive analysis report including:
680+
- Validated station names with EVA numbers
681+
- List of available train connections
682+
- Departure times (scheduled and actual)
683+
- Platform information
684+
- Current delays and delay duration
685+
- Cancellation status
686+
- Service messages and disruptions
687+
- Recommendation for best connection
688+
689+
**Example**:
690+
```json
691+
{
692+
"stationA": "Frankfurt Hbf",
693+
"stationB": "Berlin Hbf",
694+
"dateTime": "2025-11-06 14:30"
695+
}
696+
```
697+
698+
**Sample Output**:
699+
```
700+
=== Train Connection Analysis ===
701+
702+
Step 1: Resolving station 'Frankfurt Hbf'...
703+
✓ Found: Frankfurt(Main)Hbf (EVA: 8000105)
704+
705+
Step 2: Resolving station 'Berlin Hbf'...
706+
✓ Found: Berlin Hbf (EVA: 8011160)
707+
708+
Step 3: Fetching departures from Frankfurt(Main)Hbf...
709+
✓ Timetable retrieved
710+
711+
Step 4: Checking for delays and disruptions at Frankfurt(Main)Hbf...
712+
✓ Recent changes retrieved
713+
714+
Step 5: Finding trains from Frankfurt(Main)Hbf to Berlin Hbf...
715+
✓ Found 3 connection(s)
716+
717+
=== Available Connections ===
718+
719+
Option 1: ICE 1234
720+
Departure: 14:30 from Frankfurt(Main)Hbf
721+
Platform: 7
722+
✓ On time
723+
Destination: Berlin Hbf
724+
725+
Option 2: ICE 5678
726+
Departure: 15:30 from Frankfurt(Main)Hbf
727+
Platform: 9
728+
⚠ Originally scheduled: 15:25
729+
⚠ Delay: +5 minutes
730+
Destination: Berlin Hbf
731+
732+
=== Recommendation ===
733+
✓ Best option: ICE 1234 at 14:30 - On time
734+
```
735+
669736
### Common EVA Station Numbers
670737

671738
Here are some commonly used EVA station numbers for testing:

0 commit comments

Comments
 (0)