Fares by class
precosRetrieve fares in EUR per passenger for Portuguese train journey options, covering first and second class, and optionally filter results by train number or travel class.
Instructions
Fares only (EUR per passenger) for each journey option, for 1st and 2nd class. Optionally restrict to one train number or one class.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "precos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination station: name or CP code | |
| date | No | Travel date YYYY-MM-DD (Europe/Lisbon). Default: today | |
| from | Yes | Origin station: name (fuzzy, accents optional) or CP code like 94-30007 | |
| lang | No | Language for names and messages | PT |
| after | No | Earliest departure HH:MM | |
| before | No | Latest departure HH:MM | |
| services | No | Keep only journeys whose every leg uses one of these service codes. Valid codes could not be loaded at startup; they are checked against CP at call time. | |
| passengers | No | Number of adults | |
| direct_only | No | Only journeys without transfers | |
| return_date | No | Optional return date YYYY-MM-DD | |
| train_number | No | Only options that include this train | |
| travel_class | No | Only this class (default: both) |