get_train_prices
Retrieve train prices for SNCF journeys by providing origin, destination, and departure time. Fetches available fare data.
Instructions
Get train prices (EXPERIMENTAL - Educational Proof of Concept).
⚠️ WARNING: This is an experimental feature that attempts to scrape prices from SNCF. It may not work due to:
Anti-scraping measures
API changes
Terms of Service restrictions
For production use, consider:
Lyko SNCF Connect API
Trainline API
Official SNCF partnerships
Args: origin: Origin station name (e.g., "Paris", "Lyon") destination: Destination station name (e.g., "Marseille") departure_datetime: Date/time in flexible formats (default: today) page: Page number for pagination (default: 1) per_page: Results per page (default: 5, max: 20)
Returns: Formatted string with price information (if available)
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": {
"origin": "<origin>",
"destination": "<destination>"
},
"name": "get_train_prices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| origin | Yes | ||
| per_page | No | ||
| destination | Yes | ||
| departure_datetime | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |